Package:
src:nn
Source:
nn
Submitter:
Bjarni Ingi Gislason
Date:
2021-02-21 16:15:06 UTC
Severity:
normal
Tags:
#983257#5
Date:
2021-02-21 16:13:45 UTC
From:
To:
Dear Maintainer,

/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 <bjarniig@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;
 }