FreeBSD Bugzilla – Attachment 107322 Details for
Bug 148081
games/teeworlds server segfaults
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.66 KB, created by
David Demelier
on 2010-06-23 09:20:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
David Demelier
Created:
2010-06-23 09:20:01 UTC
Size:
1.66 KB
patch
obsolete
>--- /dev/null 2010-06-23 09:45:16.000000000 +0200 >+++ files/patch-e_network.c 2010-06-23 09:43:04.000000000 +0200 >@@ -0,0 +1,15 @@ >+--- src/engine/e_network.c.orig 2010-06-23 09:39:36.000000000 +0200 >++++ src/engine/e_network.c 2010-06-23 09:41:29.000000000 +0200 >+@@ -224,6 +224,12 @@ >+ >+ if(packet->flags&NET_PACKETFLAG_CONNLESS) >+ { >++ /* check the size of connless packet */ >++ if(size < 6) >++ { >++ dbg_msg("", "connless packet too small, %d", size); >++ return -1; >++ } >+ packet->flags = NET_PACKETFLAG_CONNLESS; >+ packet->ack = 0; >+ packet->num_chunks = 0; >--- /dev/null 2010-06-23 09:45:22.000000000 +0200 >+++ files/patch-es_server.c 2010-06-23 09:43:27.000000000 +0200 >@@ -0,0 +1,20 @@ >+--- src/engine/server/es_server.c.orig 2010-06-23 09:41:50.000000000 +0200 >++++ src/engine/server/es_server.c 2010-06-23 09:42:21.000000000 +0200 >+@@ -303,7 +303,7 @@ >+ >+ void server_kick(int client_id, const char *reason) >+ { >+- if(client_id < 0 || client_id > MAX_CLIENTS) >++ if(client_id < 0 || client_id >= MAX_CLIENTS) >+ return; >+ >+ if(clients[client_id].state != SRVCLIENT_STATE_EMPTY) >+@@ -1244,7 +1244,7 @@ >+ NETADDR addr; >+ int cid = atoi(str); >+ >+- if(cid < 0 || cid > MAX_CLIENTS || clients[cid].state == SRVCLIENT_STATE_EMPTY) >++ if(cid < 0 || cid >= MAX_CLIENTS || clients[cid].state == SRVCLIENT_STATE_EMPTY) >+ { >+ dbg_msg("server", "invalid client id"); >+ return; >--- Makefile.orig 2010-06-23 10:04:01.000000000 +0200 >+++ Makefile 2010-06-23 10:04:13.000000000 +0200 >@@ -7,6 +7,7 @@ > > PORTNAME= teeworlds > PORTVERSION= 0.5.2 >+PORTREVISION= 1 > CATEGORIES= games > MASTER_SITES= http://www.teeworlds.com/files/ \ > http://mirror.amdmi3.ru/distfiles/
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 148081
: 107322