Line 0
Link Here
|
|
|
1 |
--- gnats/files.c.orig Mon Feb 12 06:36:25 2001 |
2 |
+++ gnats/files.c Sat Jun 14 13:17:58 2003 |
3 |
@@ -271,7 +271,7 @@ |
4 |
char *path = (char *) alloca (PATH_MAX); |
5 |
|
6 |
memset (array, 0, NUM_RESPONSIBLE_FIELDS * sizeof (char *)); |
7 |
- sprintf (path, "%s/gnats-adm/%s", gnats_root, RESPONSIBLE_FILE); |
8 |
+ snprintf (path, PATH_MAX-1, "%s/gnats-adm/%s", gnats_root, RESPONSIBLE_FILE); |
9 |
fp = fopen (path, "r"); |
10 |
if (fp == NULL) |
11 |
return 0; |
12 |
@@ -358,7 +358,7 @@ |
13 |
int i, nerrs = 0; |
14 |
|
15 |
memset (array, 0, NUM_CLASS_FIELDS * sizeof (char *)); |
16 |
- sprintf (path, "%s/gnats-adm/%s", gnats_root, CLASSES); |
17 |
+ snprintf (path, PATH_MAX-1, "%s/gnats-adm/%s", gnats_root, CLASSES); |
18 |
fp = fopen (path, "r"); |
19 |
|
20 |
if (fp == NULL) |
21 |
@@ -593,7 +593,7 @@ |
22 |
int i, nerrs = 0; |
23 |
|
24 |
memset (array, 0, NUM_STATE_FIELDS * sizeof (char *)); |
25 |
- sprintf (path, "%s/gnats-adm/%s", gnats_root, STATES); |
26 |
+ snprintf (path, PATH_MAX-1, "%s/gnats-adm/%s", gnats_root, STATES); |
27 |
fp = fopen (path, "r"); |
28 |
|
29 |
if (fp == NULL) |