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

Dear Maintainer,

>From 3ce77904fbb554af01ec01b35af3705798186d46 Mon Sep 17 00:00:00 2001
>From: Bjarni Ingi Gislason <bjarn...@rhi.hi.is>
>Date: Sun, 21 Feb 2021 00:16:07 +0000
>Subject: [PATCH] global.c: use "mkstemp" instead of "mktemp"

  Warning from the linker:

/usr/bin/ld: global.o: in function `new_temp_file':
global.c:(.text+0x4df): warning: the use of `mktemp' is dangerous,
better use `mkstemp' or `mkdtemp'

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

diff --git a/global.c b/global.c
index a783672..1f8ef67 100644
--- a/global.c
+++ b/global.c
@@ -369,7 +369,7 @@ new_temp_file(void)
     }
 
     sprintf(buf, "%s/nn.XXXXXX", tmp_directory);
-    mktemp(buf);
+    mkstemp(buf);
     temp_file = buf;
 }
 
-- 
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