1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
--- a/client.c 2001-12-16 04:26:38.000000000 -0500
+++ b/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;
|