File: format-security.diff

package info (click to toggle)
maloc 0.2-2.3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 3,944 kB
  • sloc: sh: 11,370; ansic: 9,597; yacc: 2,922; lex: 294; makefile: 179; java: 134; fortran: 74
file content (24 lines) | stat: -rw-r--r-- 1,194 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
Description: Fix build when -Werror=format-security is enabled.
Author: Tim Retout <diocles@debian.org>
Bug-Debian: http://bugs.debian.org/643441

--- maloc-0.2.orig/src/vsys/vnm.c
+++ maloc-0.2/src/vsys/vnm.c
@@ -910,7 +910,7 @@
                     fprintf(cons[unit],"# MC-shell I/O capture file.\n");
                     now = time(VNULL);
                     sprintf(str,"# Creation Date and Time:  %s",ctime(&now));
-                    fprintf(cons[unit],str);
+                    fprintf(cons[unit],"%s",str);
                     fprintf(cons[unit],"####################################"
                         "##########################################\n");
                 } else if (unit == 3) {
@@ -920,7 +920,7 @@
                     fprintf(cons[unit],"# MC-shell history file.\n");
                     now = time(VNULL);
                     sprintf(str,"# Creation Date and Time:  %s",ctime(&now));
-                    fprintf(cons[unit],str);
+                    fprintf(cons[unit],"%s",str);
                     fprintf(cons[unit],"####################################"
                         "##########################################\n");
                 }