diff options
Diffstat (limited to 'src/engine/e_network.c')
| -rw-r--r-- | src/engine/e_network.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/engine/e_network.c b/src/engine/e_network.c index c7aabc99..3c32de1d 100644 --- a/src/engine/e_network.c +++ b/src/engine/e_network.c @@ -224,6 +224,12 @@ int unpack_packet(unsigned char *buffer, int size, NETPACKETCONSTRUCT *packet) if(packet->flags&NET_PACKETFLAG_CONNLESS) { + if(size < 6) + { + dbg_msg("", "connection less packet too small, %d", size); + return -1; + } + packet->flags = NET_PACKETFLAG_CONNLESS; packet->ack = 0; packet->num_chunks = 0; |