Source: nn Version: 6.7.3-14 Severity: normal Tags: patch Dear Maintainer,
>From b05e6a18cf49e1aca681bebd0e51521af1231c5d Mon Sep 17 00:00:00 2001 >From: Bjarni Ingi Gislason <bjarn...@rhi.hi.is> >Date: Sun, 28 Mar 2021 16:06:18 +0000 >Subject: [PATCH] aux.c: change "sigfile[]" to "sigfile_name[]" and move it to > the head of the file to make the name usable in it The name "sigfile" was also used for a file pointer (FILE *). Signed-off-by: Bjarni Ingi Gislason <bjarn...@rhi.hi.is> --- aux.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/aux.c b/aux.c index 72f3b6f..a070136 100644 --- a/aux.c +++ b/aux.c @@ -48,6 +48,9 @@ int response_check_pause = 0; /* time to wait for * background cmds */ char *response_dflt_answer = "send"; +static char sigfile_name[FILENAME]; + + int aux_sh(article_header *, char *, char *, char *, char *, char *, int, int); @@ -206,7 +209,6 @@ find_signature(void) { struct passwd *passwd; char *dotdir; - char sigfile[FILENAME]; FILE *fp; passwd = getpwuid(getuid()); @@ -215,20 +217,20 @@ find_signature(void) dotdir = passwd->pw_dir; if (dotdir[0] == '~') { - (void) strcpy(sigfile, passwd->pw_dir); - (void) strcat(sigfile, &dotdir[1]); + (void) strcpy(sigfile_name, passwd->pw_dir); + (void) strcat(sigfile_name, &dotdir[1]); } else { - (void) strcpy(sigfile, dotdir); + (void) strcpy(sigfile_name, dotdir); } - (void) strcat(sigfile, "/"); - (void) strcat(sigfile, ".signature"); + (void) strcat(sigfile_name, "/"); + (void) strcat(sigfile_name, ".signature"); #ifdef DEBUG - fprintf(stderr, "sigfile = '%s'\n", sigfile); + fprintf(stderr, "sigfile_name = '%s'\n", sigfile_name); sleep(2); #endif - fp = fopen(sigfile, "r"); + fp = fopen(sigfile_name, "r"); #ifdef DEBUG if (fp != NULL) { @@ -274,7 +276,7 @@ append_signature(FILE * sigfile) (void) fclose(temp); #ifdef DEBUG - printf(".signature appended (from %s)\n", sigfile); + printf(".signature appended (from %s)\n", sigfile_name); sleep(10); #endif } -- 2.30.2 -- System Information: Debian Release: bullseye/sid APT prefers testing-security APT policy: (500, 'testing-security'), (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