File: format_not_a_string_literal.patch

package info (click to toggle)
liblocale-hebrew-perl 1.05-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 308 kB
  • sloc: perl: 1,286; ansic: 660; makefile: 2
file content (33 lines) | stat: -rw-r--r-- 703 bytes parent folder | download | duplicates (3)
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
Description: fix "format not a string literal" compile error [-Werror=format-security]
Author: Florian Schlichting <fsfs@debian.org>
Forwarded: https://rt.cpan.org/Ticket/Display.html?id=94692

--- a/bidi.c
+++ b/bidi.c
@@ -1234,7 +1234,7 @@
     }
     pszTypes[ich] = 0;
 
-    fprintf(f, pszTypes);
+    fprintf(f, "%s", pszTypes);
 }
 
 void ShowTypes(FILE* f, int * types, int cch) {
@@ -1245,7 +1245,7 @@
     }
     pszTypes[ich] = 0;
 
-    fprintf(f, pszTypes);
+    fprintf(f, "%s", pszTypes);
 }
 
 void ShowLevels(FILE* f, int * levels, int cch) {
@@ -1256,7 +1256,7 @@
     }
     pszLevel[ich] = 0;
 
-    fprintf(f, pszLevel);
+    fprintf(f, "%s", pszLevel);
 }
 
 void usage(char *s) {