aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-25 18:31:15 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-25 18:31:15 +0100
commit3eecc290f013e7e1aecbf31dfe236436c072e4d0 (patch)
treec13bbd8e90a90c0a1614e090257ccfe496fca71b /FICS
parente047a9074a87e895b48bf1fb447a415b3772b9c6 (diff)
Improved pprintf_noformat()
Diffstat (limited to 'FICS')
-rw-r--r--FICS/utils.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/FICS/utils.c b/FICS/utils.c
index 4a5e4b0..6cf0285 100644
--- a/FICS/utils.c
+++ b/FICS/utils.c
@@ -326,12 +326,9 @@ pprintf_noformat(int p, char *format,...)
va_list ap;
va_start(ap, format);
- retval = vsprintf(tmp, format, ap);
+ retval = vsnprintf(tmp, sizeof tmp, format, ap);
va_end(ap);
- if (strlen(tmp) > 10 * MAX_LINE_SIZE)
- fprintf(stderr, "FICS: %s: buffer overflow\n", __func__);
-
net_send_string(parray[p].socket, tmp, 0);
return retval;
}