Source: nn Version: 6.7.3-14 Severity: normal Tags: patch Dear Maintainer,
>From ced49aa3205279d9e3ea678de129a3326c13f9fb Mon Sep 17 00:00:00 2001 >From: Bjarni Ingi Gislason <bjarn...@rhi.hi.is> >Date: Thu, 18 Mar 2021 03:51:31 +0000 >Subject: [PATCH] aux.c: calculate the size of NBUF to accommodate two arrays > and a string The compiler issues warnings about the needed length in several uses of "snprintf()". Signed-off-by: Bjarni Ingi Gislason <bjarn...@rhi.hi.is> --- aux.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aux.c b/aux.c index f5c3a87..72f3b6f 100644 --- a/aux.c +++ b/aux.c @@ -298,7 +298,9 @@ aux_sh(article_header * ah, char *script, char *prog, char *action, char *record char route[512], *poster = NULL; int goodsigntype = 0; int loop = 1, prmpt = 0; -#define NBUF 80 +/* 53 is the length of the string "awk ..." in the line number about 589 */ +/* NBUF = sizeof(bdy) + sizeof(sgn) + 53 + strlen(NUL) */ +#define NBUF 2 * FILENAME + 54 #define NBUF2 10 char cc[256], pr[80], pr1[80], fname[FILENAME], buf[NBUF]; char buf2[NBUF2]; -- 2.30.2 -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.10.19-1 (SMP w/2 CPU threads) Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) -- debconf information excluded -- Bjarni I. Gislason