File: 06-fix-format-strings.patch

package info (click to toggle)
alliance 5.0-20120515-6
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 70,324 kB
  • ctags: 39,977
  • sloc: ansic: 350,299; vhdl: 34,227; yacc: 27,122; sh: 12,416; cpp: 9,478; makefile: 7,057; lex: 3,684
file content (101 lines) | stat: -rw-r--r-- 3,628 bytes parent folder | download | duplicates (2)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
Description: Format string fixes
 This patch fixes some format string problems with fprintf().
Author: Roland Stigge <stigge@antcom.de>

Index: alliance-5.0-20110203/rtd/src/rtd_drive.c
===================================================================
--- alliance-5.0-20110203.orig/rtd/src/rtd_drive.c	2002-09-30 18:21:10.000000000 +0200
+++ alliance-5.0-20110203/rtd/src/rtd_drive.c	2012-03-24 15:24:00.000000000 +0100
@@ -100,7 +100,7 @@
     RtlExprLength = Length;
   }
 
-  fprintf( RtlFile, Name );
+  fprintf( RtlFile, "%s", Name );
 }
 
 /*------------------------------------------------------------\
Index: alliance-5.0-20110203/vpd/src/vpd_drive.c
===================================================================
--- alliance-5.0-20110203.orig/vpd/src/vpd_drive.c	2002-09-30 18:21:32.000000000 +0200
+++ alliance-5.0-20110203/vpd/src/vpd_drive.c	2012-03-24 15:37:53.000000000 +0100
@@ -100,7 +100,7 @@
     VpnExprLength = Length;
   }
 
-  fprintf( VpnFile, Name );
+  fprintf( VpnFile, "%s", Name );
 }
 
 /*------------------------------------------------------------\
Index: alliance-5.0-20110203/boog/src/bog_normalize_message.c
===================================================================
--- alliance-5.0-20110203.orig/boog/src/bog_normalize_message.c	2002-09-30 18:19:58.000000000 +0200
+++ alliance-5.0-20110203/boog/src/bog_normalize_message.c	2012-03-24 15:50:03.000000000 +0100
@@ -106,7 +106,7 @@
    }
 
    fprintf(stderr,"BEH: ");
-   fprintf(stderr,message);
+   fprintf(stderr,"%s",message);
    fprintf(stderr," in '");
    fflush(stderr);
    display_abl(abl);
Index: alliance-5.0-20110203/l2p/src/drive_ps.c
===================================================================
--- alliance-5.0-20110203.orig/l2p/src/drive_ps.c	2005-02-17 16:34:44.000000000 +0100
+++ alliance-5.0-20110203/l2p/src/drive_ps.c	2012-03-24 16:02:33.000000000 +0100
@@ -83,22 +83,22 @@
 		break;
 		case E_OPEN :
 			fprintf (stderr, "Problem while opening file ");
-			fprintf (stderr, msg);
+			fprintf (stderr, "%s", msg);
 		break;
 		case E_CLOSE :
 			fprintf (stderr, "Problem while closing file ");
-			fprintf (stderr, msg);
+			fprintf (stderr, "%s", msg);
 		break;
 		case E_WRITE :
 			fprintf (stderr, "Problem while writing file ");
-			fprintf (stderr, msg);
+			fprintf (stderr, "%s", msg);
 		break;
 		case E_READ :
 			fprintf (stderr, "Problem while reading file ");
-			fprintf (stderr, msg);
+			fprintf (stderr, "%s", msg);
 		break;
 		case E_OUTBOX :
-			fprintf (stderr, msg);
+			fprintf (stderr, "%s", msg);
 		break;
 		default :
 			fprintf (stderr, "Unknow internal error");
Index: alliance-5.0-20110203/loon/src/lon_normalize_message.c
===================================================================
--- alliance-5.0-20110203.orig/loon/src/lon_normalize_message.c	2004-09-06 23:26:09.000000000 +0200
+++ alliance-5.0-20110203/loon/src/lon_normalize_message.c	2012-03-24 16:15:39.000000000 +0100
@@ -106,7 +106,7 @@
    }
 
    fprintf(stderr,"BEH: ");
-   fprintf(stderr,message);
+   fprintf(stderr,"%s",message);
    fprintf(stderr," in '");
    fflush(stderr);
    display_abl(abl);
Index: alliance-5.0-20110203/sea/src/util_LEFDEF.c
===================================================================
--- alliance-5.0-20110203.orig/sea/src/util_LEFDEF.c	2004-09-29 23:40:46.000000000 +0200
+++ alliance-5.0-20110203/sea/src/util_LEFDEF.c	2012-03-24 16:36:27.000000000 +0100
@@ -213,7 +213,7 @@
     *pI = (char)0; pI += 1;
     sprintf (asLEF, "%s(%s)", sTmp, pI);
   } else {
-    sprintf (asLEF, sTmp);
+    sprintf (asLEF, "%s", sTmp);
   }
 
   return (asLEF);