From 7b53dccb0681cb9db08ab74f909c2d6d59769b09 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sun, 17 Dec 2023 11:58:15 +0100 Subject: com_mailsource: sprintf() -> snprintf() --- FICS/comproc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/FICS/comproc.c b/FICS/comproc.c index feffdd9..e515575 100644 --- a/FICS/comproc.c +++ b/FICS/comproc.c @@ -1494,10 +1494,11 @@ com_mailsource(int p, param_list param) if ((count = search_directory(source_dir, iwant, buffer, 1000)) == 0) { pprintf(p, "Found no source file matching \"%s\".\n", iwant); } else if ((count == 1) || !strcmp(iwant, *buffer)) { - sprintf(subj, "FICS source file from server %s: %s", + snprintf(subj, sizeof subj, "FICS source file from server " + "%s: %s", fics_hostname, *buffer); - sprintf(fname, "%s/%s", + snprintf(fname, sizeof fname, "%s/%s", source_dir, *buffer); -- cgit v1.2.3