aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/lists.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-05-19 22:47:02 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2024-05-19 22:47:02 +0200
commit34af3b32d9fa576c5c3db34f386876db1fa2f260 (patch)
tree4e15014ade34719625c6aae4420c665a8cb05a5e /FICS/lists.c
parentedbdcfb24c5e534e79ff5261db1064ab5676e67e (diff)
Replaced the sprintf() calls
Diffstat (limited to 'FICS/lists.c')
-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);