summaryrefslogtreecommitdiff
path: root/games/0verkill/files/patch-client.c
diff options
context:
space:
mode:
authorMichael Landin <mich@FreeBSD.org>2013-12-23 16:32:05 +0000
committerMichael Landin <mich@FreeBSD.org>2013-12-23 16:32:05 +0000
commit2dac7afb6ac788e7472141bef4ef8adc794a6dd8 (patch)
tree0ae4d735896d179873d26bf4e0161680ba8b715d /games/0verkill/files/patch-client.c
parent- Support for staging (diff)
1. Merge fixes for long known bugs from hackndev[1] version
3507529 64bit fix ... now works on amd64 as well ;-) 95d2af2 Replaced all those insecure sprintf's with snprintf's (partial) 33a1a8d Fix sigsegv on hero reaching topmost or leftmost border of the game area 436bbfc Push back network stack underflow bugfix 160e4d6 Prevent buffer overflow ee911ba make the server invulnerable to long names 2. Add patch from gentoo linux[2] to use unmodified game data. 3. Support staging 4. Use options framework [1] https://github.com/hackndev/0verkill [2] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/games-action/0verkill/files/0verkill-0.16-gentoo-paths.patch?revision=1.1&view=markup PR: ports/184252 Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>
Notes
Notes: svn path=/head/; revision=337259
Diffstat (limited to 'games/0verkill/files/patch-client.c')
-rw-r--r--games/0verkill/files/patch-client.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/games/0verkill/files/patch-client.c b/games/0verkill/files/patch-client.c
new file mode 100644
index 000000000000..bdd5d483b5dd
--- /dev/null
+++ b/games/0verkill/files/patch-client.c
@@ -0,0 +1,26 @@
+--- client.c.orig 2001-12-16 12:26:38.000000000 +0300
++++ client.c 2013-11-17 11:40:44.755218781 +0400
+@@ -191,9 +191,9 @@
+ unsigned char txt[256];
+
+ #ifndef WIN32
+- sprintf(txt,"%s/%s",getenv("HOME"),CFG_FILE);
++ snprintf(txt,sizeof(txt),"%s/%s",getenv("HOME"),CFG_FILE);
+ #else
+- sprintf(txt,"./%s",CFG_FILE);
++ snprintf(txt,sizeof(txt),"./%s",CFG_FILE);
+ #endif
+ stream=fopen(txt,"r");
+ if (!stream)return;
+@@ -223,9 +223,9 @@
+ unsigned char txt[256];
+
+ #ifndef WIN32
+- sprintf(txt,"%s/%s",getenv("HOME"),CFG_FILE);
++ snprintf(txt,sizeof(txt),"%s/%s",getenv("HOME"),CFG_FILE);
+ #else
+- sprintf(txt,"./%s",CFG_FILE);
++ snprintf(txt,sizeof(txt),"./%s",CFG_FILE);
+ #endif
+ stream=fopen(txt,"w");
+ if (!stream)return;