File: 0110-fixed-segfault-when-creating-logfile.patch

package info (click to toggle)
foomatic-filters 4.0.17-16
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 2,216 kB
  • sloc: ansic: 6,372; sh: 2,532; perl: 219; makefile: 154; python: 8
file content (16 lines) | stat: -rw-r--r-- 447 bytes parent folder | download | duplicates (2)
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