Description: foomatic-rip: Fixed segfault when creating log file (Bug #1206).
Author: Till Kamppeter <till.kamppeter@gmail.com>
Forwarded: not needed
Last-Update: 2014-04-25
--- a/foomaticrip.c
+++ b/foomaticrip.c
@@ -1197,7 +1197,8 @@
         debug = 1;
 
     if (debug) {
-	int fd = mkstemp (LOG_FILE "-XXXXXX.log");
+	sprintf(tmp, "%s-XXXXXX.log", LOG_FILE);
+	int fd = mkstemps (tmp, 4);
 	if (fd != -1)
 	    logh = fdopen(fd, "w");
 	else
