Replace insecure tmpfile() with mkstemp() based local tempfile()

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2015-06-21 21:54:24 +02:00
1 parent c6a9fa3b98
commit 162b394726
3 files changed
+24 -1

No files matched your search

+1 -1
View File
@@ -179,7 +179,7 @@ int run_interactive(char *cmd, char *fmt, ...)
}
/* Redirect output from cmd to a tempfile */
fp = tmpfile();
fp = tempfile();
if (fp && !debug) {
oldout = dup(STDOUT_FILENO);
olderr = dup(STDERR_FILENO);