blob: ea3b06d789c45d60482d9524aaa9fc980ec1da97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
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
|