Package: vtprint / 2.0.2-13

20_add-missing-format-strings.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Description: add missing format strings to fprintf() calls
 This silences the gcc format-security warning
 "format not a string literal and no format arguments"
 which Debian treats as an error for hardening purposes.
Author: Joe Nahmias <jello@debian.org>
Last-Update: 2013-06-27
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- vtprint.orig/vtprint.c
+++ vtprint/vtprint.c
@@ -549,14 +549,14 @@
     if (!strcmp (vtbasename, "vtprton"))
     {
         fflush (outfile);
-        fprintf (outfile, ptr_on);
+        fprintf (outfile, "%s", ptr_on);
         fflush (outfile);
         exit (0);
     }
     if (!strcmp (vtbasename, "vtprtoff"))
     {
         fflush (outfile);
-        fprintf (outfile, ptr_off);
+        fprintf (outfile, "%s", ptr_off);
         fflush (outfile);
         exit (0);
     }
@@ -620,7 +620,7 @@
         }
 
         fflush (outfile);
-        fprintf (outfile, ptr_on);
+        fprintf (outfile, "%s", ptr_on);
         fflush (outfile);
 
         while ((ch = fgetc (infile)) != EOF)
@@ -649,7 +649,7 @@
 
         fclose (infile);
         if (ffeed) fputc (FF, outfile);
-        fprintf (outfile, ptr_off);
+        fprintf (outfile, "%s", ptr_off);
         fflush (outfile);
 
         cnt++;