From eae7d0b9e25648ed6d9d9e990f176570b11386b5 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sat, 30 Mar 2024 01:23:55 +0100 Subject: Replaced sprintf() calls --- FICS/eco.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FICS/eco.c b/FICS/eco.c index cf072f2..ebaf52a 100644 --- a/FICS/eco.c +++ b/FICS/eco.c @@ -118,7 +118,7 @@ ECO_init(void) char *ptmp = tmp; int i = 0; - sprintf(filename, "%s/eco999.idx", book_dir); + snprintf(filename, sizeof filename, "%s/eco999.idx", book_dir); if ((fp = fopen(filename, "r")) == NULL) { fprintf(stderr, "Could not open ECO file (%s)\n", filename); @@ -181,7 +181,7 @@ NIC_init(void) char *ptmp = tmp; int i = 0; - sprintf(filename, "%s/nic999.idx", book_dir); + snprintf(filename, sizeof filename, "%s/nic999.idx", book_dir); if ((fp = fopen(filename, "r")) == NULL) { fprintf(stderr, "Could not open NIC file\n"); @@ -236,7 +236,7 @@ LONG_init(void) char *ptmp = tmp; int i = 0; - sprintf(filename, "%s/long999.idx", book_dir); + snprintf(filename, sizeof filename, "%s/long999.idx", book_dir); if ((fp = fopen(filename, "r")) == NULL) { fprintf(stderr, "Could not open LONG file\n"); -- cgit v1.2.3