summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2010-11-08 10:57:53 +0000
committerAlfredo Tupone <tupone@gentoo.org>2010-11-08 10:57:53 +0000
commit493d903a9e88da7d2cc6ece6c6ffa8e652cb7b1e (patch)
treea52791beadb5828c1b8d0f085fd195650c9932e8 /games-action/0verkill/files
parentx86 stable wrt bug #344333 (diff)
downloadgentoo-2-493d903a9e88da7d2cc6ece6c6ffa8e652cb7b1e.tar.gz
gentoo-2-493d903a9e88da7d2cc6ece6c6ffa8e652cb7b1e.tar.bz2
gentoo-2-493d903a9e88da7d2cc6ece6c6ffa8e652cb7b1e.zip
Fix overflow. Bug #337188
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'games-action/0verkill/files')
-rw-r--r--games-action/0verkill/files/0verkill-0.16-ovflfix.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/games-action/0verkill/files/0verkill-0.16-ovflfix.patch b/games-action/0verkill/files/0verkill-0.16-ovflfix.patch
new file mode 100644
index 000000000000..3df8a0789545
--- /dev/null
+++ b/games-action/0verkill/files/0verkill-0.16-ovflfix.patch
@@ -0,0 +1,24 @@
+--- server.c.old 2010-11-08 11:53:18.000000000 +0100
++++ server.c 2010-11-08 11:53:43.000000000 +0100
+@@ -905,8 +905,8 @@
+ int len;
+
+ packet[0]=P_MESSAGE;
+- if (!name){snprintf(packet+1,256,"%s",msg);len=strlen(msg)+1+1;}
+- else {snprintf(packet+1,256,"%s> %s",name,msg);len=strlen(name)+strlen(msg)+1+3;}
++ if (!name){snprintf(packet+1,255,"%s",msg);len=strlen(msg)+1+1;}
++ else {snprintf(packet+1,255,"%s> %s",name,msg);len=strlen(name)+strlen(msg)+1+3;}
+ send_chunk_packet_to_player(packet,len,player);
+ }
+
+--- console.c.old 2010-11-08 11:53:26.000000000 +0100
++++ console.c 2010-11-08 11:54:44.000000000 +0100
+@@ -206,7 +206,7 @@
+ void c_setcolor_3b(unsigned char a)
+ {
+ char txt[8];
+- snprintf(txt,16,"\033[%dm",30+(a&7));
++ snprintf(txt,sizeof(txt),"\033[%dm",30+(a&7));
+ my_print(txt);
+ }
+