diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-01-01 14:05:31 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-01-01 14:05:31 +0100 |
commit | 0e111361d7a9d82420d775c9363c234ecec03bbd (patch) | |
tree | 73619cfb2d5e5178bf9ed1aadbab66e8055151e3 /FICS/adminproc.c | |
parent | 9303b5c6f93d33fe3de61d6181d7f36559aee4f1 (diff) |
Replaced sprintf() calls
Diffstat (limited to 'FICS/adminproc.c')
-rw-r--r-- | FICS/adminproc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/FICS/adminproc.c b/FICS/adminproc.c index 1c1b84a..00d7d54 100644 --- a/FICS/adminproc.c +++ b/FICS/adminproc.c @@ -213,11 +213,12 @@ create_news_index(int p, param_list param, int admin) } else { num_anews++; - sprintf(new_item, "%ld %d %s\n", + snprintf(new_item, sizeof new_item, "%ld %d %s\n", (long int)time(NULL), num_anews, param[0].val.string); - sprintf(filename, "%s/newadminnews.index", news_dir); + snprintf(filename, sizeof filename, + "%s/newadminnews.index", news_dir); if (add_item(new_item, filename)) { pprintf(p, "Index for admin news item #%d " @@ -236,8 +237,9 @@ create_news_index(int p, param_list param, int admin) } else { num_news++; - sprintf(filename, "%s/newnews.index", news_dir); - sprintf(new_item, "%ld %d %s\n", + snprintf(filename, sizeof filename, "%s/newnews.index", + news_dir); + snprintf(new_item, sizeof new_item, "%ld %d %s\n", (long int)time(NULL), num_news, param[0].val.string); |