Source: nn
Version: 6.7.3-14
Severity: normal
Tags: patch

Dear Maintainer,

>From cb0cb7b01ae8049b40d2f2a26ab54ec8ec58665a Mon Sep 17 00:00:00 2001
>From: Bjarni Ingi Gislason <bjarn...@rhi.hi.is>
>Date: Thu, 25 Feb 2021 22:43:26 +0000
>Subject: [PATCH] account.c: use "snprintf()" instead of "sprintf()"

  account.c: use "snprintf()" instead of "sprintf()"

Signed-off-by: Bjarni Ingi Gislason <bjarn...@rhi.hi.is>
---
 account.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/account.c b/account.c
index 257ccdd..5bd0b98 100644
--- a/account.c
+++ b/account.c
@@ -310,7 +310,7 @@ do_zero(void)
     if (old == NULL)
        goto err;
 
-    sprintf(bak, "%s.old", acct);
+    snprintf(bak, FILENAME, "%s.old", acct);
     if (unlink(bak) < 0 && errno != ENOENT)
        goto err;
     if (link(acct, bak) < 0)
-- 
2.30.0



-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.9-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

Reply via email to