about summary refs log tree commit diff
path: root/src/engine/e_network.c
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2009-05-31 09:44:20 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2009-05-31 09:44:20 +0000
commit4bb1df318905f491740f4298c69cda317fb53fcb (patch)
tree486c4edf2d6af2089ffab60a7422d5e7abefa891 /src/engine/e_network.c
parentb28ede2da2c42643c5aa710a8076f0249d48c9e4 (diff)
downloadzcatch-4bb1df318905f491740f4298c69cda317fb53fcb.tar.gz
zcatch-4bb1df318905f491740f4298c69cda317fb53fcb.zip
moved 0.5 branch to trunk
Diffstat (limited to 'src/engine/e_network.c')
-rw-r--r--src/engine/e_network.c6
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;