aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-extended/rxtx/files/format_security.patch
blob: bd074ad0281aba522fa8f2de14240784381c847b (plain)
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
102
103
104
105
106
107
108
109
110
111
112
From: tony mancill <tmancill@debian.org>
Forwarded: no
Description: use format specifiers in fprintf statements for hardening flags
Upstream-Status: Pending

--- a/src/SerialImp.c
+++ b/src/SerialImp.c
@@ -5108,7 +5108,7 @@
 void report_warning(const char *msg)
 {
 #ifndef DEBUG_MW
-	fprintf(stderr, msg);
+	fprintf(stderr, "%s", msg);
 #else
 	mexWarnMsgTxt( (const char *) msg );
 #endif /* DEBUG_MW */
@@ -5129,7 +5129,7 @@
 #ifdef DEBUG_MW
 	mexErrMsgTxt( msg );
 #else
-	fprintf(stderr, msg);
+	fprintf(stderr, "%s", msg);
 #endif /* DEBUG_MW */
 #endif /* DEBUG_VERBOSE */
 }
@@ -5145,7 +5145,7 @@
 void report_error(const char *msg)
 {
 #ifndef DEBUG_MW
-	fprintf(stderr, msg);
+	fprintf(stderr, "%s", msg);
 #else
 	mexWarnMsgTxt( msg );
 #endif /* DEBUG_MW */
@@ -5164,7 +5164,7 @@
 {
 #ifdef DEBUG
 #	ifndef DEBUG_MW
-		fprintf(stderr, msg);
+		fprintf(stderr, "%s", msg);
 #	else
 		mexPrintf( msg );
 #	endif /* DEBUG_MW */
--- a/src/ParallelImp.c
+++ b/src/ParallelImp.c
@@ -920,7 +920,7 @@
 void report_error(char *msg)
 {
 #ifndef DEBUG_MW
-	fprintf(stderr, msg);
+	fprintf(stderr, "%s", msg);
 #else
 	mexWarnMsgTxt( msg );
 #endif /* DEBUG_MW */
@@ -938,7 +938,7 @@
 void report(char *msg)
 {
 #ifdef DEBUG
-        fprintf(stderr, msg);
+        fprintf(stderr, "%s", msg);
 #endif /* DEBUG */
 }
 
--- a/src/SerialImp.cpp
+++ b/src/SerialImp.cpp
@@ -1844,7 +1844,7 @@
 
 
 #ifdef DEBUG
-	fprintf(stderr, msg);
+	fprintf(stderr, "%s", msg);
 #endif
 }
 
--- a/CNI/SerialImp.c
+++ b/CNI/SerialImp.c
@@ -4549,7 +4549,7 @@
 void report_warning(char *msg)
 {
 #ifndef DEBUG_MW
-	fprintf(stderr, msg);
+	fprintf(stderr, "%s", msg);
 #else
 	mexWarnMsgTxt( (const char *) msg );
 #endif /* DEBUG_MW */
@@ -4570,7 +4570,7 @@
 #ifdef DEBUG_MW
 	mexErrMsgTxt( msg );
 #else
-	fprintf(stderr, msg);
+	fprintf(stderr, "%s", msg);
 #endif /* DEBUG_MW */
 #endif /* DEBUG_VERBOSE */
 }
@@ -4586,7 +4586,7 @@
 void report_error(char *msg)
 {
 #ifndef DEBUG_MW
-	fprintf(stderr, msg);
+	fprintf(stderr, "%s", msg);
 #else
 	mexWarnMsgTxt( msg );
 #endif /* DEBUG_MW */
@@ -4605,7 +4605,7 @@
 {
 #ifdef DEBUG
 #	ifndef DEBUG_MW
-		fprintf(stderr, msg);
+		fprintf(stderr, "%s", msg);
 #	else
 		mexPrintf( msg );
 #	endif /* DEBUG_MW */