View | Details | Raw Unified | Return to bug 148081
Collapse All | Expand All

(-)files/patch-e_network.c (+15 lines)
Added Link Here
1
--- src/engine/e_network.c.orig	2010-06-23 09:39:36.000000000 +0200
2
+++ src/engine/e_network.c	2010-06-23 09:41:29.000000000 +0200
3
@@ -224,6 +224,12 @@
4
 
5
 	if(packet->flags&NET_PACKETFLAG_CONNLESS)
6
 	{
7
+		/* check the size of connless packet */
8
+		if(size < 6)
9
+		{
10
+			dbg_msg("", "connless packet too small, %d", size);
11
+			return -1;
12
+		}
13
 		packet->flags = NET_PACKETFLAG_CONNLESS;
14
 		packet->ack = 0;
15
 		packet->num_chunks = 0;
(-)files/patch-es_server.c (+20 lines)
Added Link Here
1
--- src/engine/server/es_server.c.orig	2010-06-23 09:41:50.000000000 +0200
2
+++ src/engine/server/es_server.c	2010-06-23 09:42:21.000000000 +0200
3
@@ -303,7 +303,7 @@
4
 
5
 void server_kick(int client_id, const char *reason)
6
 {
7
-	if(client_id < 0 || client_id > MAX_CLIENTS)
8
+	if(client_id < 0 || client_id >= MAX_CLIENTS)
9
 		return;
10
 		
11
 	if(clients[client_id].state != SRVCLIENT_STATE_EMPTY)
12
@@ -1244,7 +1244,7 @@
13
 		NETADDR addr;
14
 		int cid = atoi(str);
15
 
16
-		if(cid < 0 || cid > MAX_CLIENTS || clients[cid].state == SRVCLIENT_STATE_EMPTY)
17
+		if(cid < 0 || cid >= MAX_CLIENTS || clients[cid].state == SRVCLIENT_STATE_EMPTY)
18
 		{
19
 			dbg_msg("server", "invalid client id");
20
 			return;
(-)Makefile (+1 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	teeworlds
8
PORTNAME=	teeworlds
9
PORTVERSION=	0.5.2
9
PORTVERSION=	0.5.2
10
PORTREVISION=	1
10
CATEGORIES=	games
11
CATEGORIES=	games
11
MASTER_SITES=	http://www.teeworlds.com/files/ \
12
MASTER_SITES=	http://www.teeworlds.com/files/ \
12
		http://mirror.amdmi3.ru/distfiles/
13
		http://mirror.amdmi3.ru/distfiles/

Return to bug 148081