summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-action/0verkill/files/0.16-home-overflow.patch')
-rw-r--r--games-action/0verkill/files/0.16-home-overflow.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/games-action/0verkill/files/0.16-home-overflow.patch b/games-action/0verkill/files/0.16-home-overflow.patch
new file mode 100644
index 000000000000..ec9b7efb36e7
--- /dev/null
+++ b/games-action/0verkill/files/0.16-home-overflow.patch
@@ -0,0 +1,26 @@
+--- client.c.orig 2001-12-16 04:26:38.000000000 -0500
++++ client.c 2003-11-17 15:12:52.850772508 -0500
+@@ -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;