aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--FICS/lists.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/FICS/lists.c b/FICS/lists.c
index 5544d9f..5f93baf 100644
--- a/FICS/lists.c
+++ b/FICS/lists.c
@@ -82,7 +82,8 @@ list_find(int p, enum ListWhich l)
char filename[MAX_FILENAME_SIZE] = { '\0' };
char listmember[100] = { '\0' };
- sprintf(filename, "%s/%s", lists_dir, ListArray[l].name);
+ msnprintf(filename, sizeof filename, "%s/%s", lists_dir,
+ ListArray[l].name);
if ((fp = fopen(filename, "r")) == NULL) {
rfree(tempList);
@@ -415,7 +416,8 @@ list_addsub(int p, char *list, char *who, int addsub)
"by %s.\n", addrem, listname, parray[p].name);
}
- sprintf(filename, "%s/%s", lists_dir, listname);
+ msnprintf(filename, sizeof filename, "%s/%s", lists_dir,
+ listname);
if ((fp = fopen(filename, "w")) == NULL) {
fprintf(stderr, "Couldn't save %s list.\n", listname);