From 4bb1df318905f491740f4298c69cda317fb53fcb Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sun, 31 May 2009 09:44:20 +0000 Subject: moved 0.5 branch to trunk --- src/engine/e_network.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/engine/e_network.c') 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; -- cgit 1.4.1