diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-25 18:31:15 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-25 18:31:15 +0100 |
commit | 3eecc290f013e7e1aecbf31dfe236436c072e4d0 (patch) | |
tree | c13bbd8e90a90c0a1614e090257ccfe496fca71b /FICS | |
parent | e047a9074a87e895b48bf1fb447a415b3772b9c6 (diff) |
Improved pprintf_noformat()
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/utils.c | 5 |
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; } |