1 | /* |
1 | /* |
2 | * static char *rcsid_init_c = |
2 | * static char *rcsid_init_c = |
3 | * "$Id: image.c,v 1.1 2006/02/03 07:14:43 root Exp $"; |
3 | * "$Id: image.c,v 1.4 2006/05/01 12:22:03 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
453 | /* It would make more sense to catch this pre-emptively in the code above. |
453 | /* It would make more sense to catch this pre-emptively in the code above. |
454 | * however, if this really happens, we probably just want to cut down the |
454 | * however, if this really happens, we probably just want to cut down the |
455 | * size to less than 1000, since that is what we claim the protocol would |
455 | * size to less than 1000, since that is what we claim the protocol would |
456 | * support. |
456 | * support. |
457 | */ |
457 | */ |
458 | if (sl.len > MAXSOCKBUF) { |
458 | if (sl.len >= MAXSOCKBUF) { |
459 | LOG(llevError,"send_image_send: buffer overrun, %d > %d\n", sl.len, MAXSOCKBUF); |
459 | LOG(llevError,"send_image_send: buffer overrun, %d > %d\n", sl.len, MAXSOCKBUF); |
460 | abort(); |
460 | abort(); |
461 | } |
461 | } |
462 | Send_With_Handling(ns, &sl); |
462 | Send_With_Handling(ns, &sl); |
463 | free(sl.buf); |
463 | free(sl.buf); |