opnsense-ports/games/0verkill/files/patch-client.c
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

26 lines
725 B
C

--- 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;