summaryrefslogtreecommitdiffstats
path: root/recipes-extended/rxtx/files/format_security.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/rxtx/files/format_security.patch')
-rw-r--r--recipes-extended/rxtx/files/format_security.patch112
1 files changed, 112 insertions, 0 deletions
diff --git a/recipes-extended/rxtx/files/format_security.patch b/recipes-extended/rxtx/files/format_security.patch
new file mode 100644
index 0000000..bd074ad
--- /dev/null
+++ b/recipes-extended/rxtx/files/format_security.patch
@@ -0,0 +1,112 @@
1From: tony mancill <tmancill@debian.org>
2Forwarded: no
3Description: use format specifiers in fprintf statements for hardening flags
4Upstream-Status: Pending
5
6--- a/src/SerialImp.c
7+++ b/src/SerialImp.c
8@@ -5108,7 +5108,7 @@
9 void report_warning(const char *msg)
10 {
11 #ifndef DEBUG_MW
12- fprintf(stderr, msg);
13+ fprintf(stderr, "%s", msg);
14 #else
15 mexWarnMsgTxt( (const char *) msg );
16 #endif /* DEBUG_MW */
17@@ -5129,7 +5129,7 @@
18 #ifdef DEBUG_MW
19 mexErrMsgTxt( msg );
20 #else
21- fprintf(stderr, msg);
22+ fprintf(stderr, "%s", msg);
23 #endif /* DEBUG_MW */
24 #endif /* DEBUG_VERBOSE */
25 }
26@@ -5145,7 +5145,7 @@
27 void report_error(const char *msg)
28 {
29 #ifndef DEBUG_MW
30- fprintf(stderr, msg);
31+ fprintf(stderr, "%s", msg);
32 #else
33 mexWarnMsgTxt( msg );
34 #endif /* DEBUG_MW */
35@@ -5164,7 +5164,7 @@
36 {
37 #ifdef DEBUG
38 # ifndef DEBUG_MW
39- fprintf(stderr, msg);
40+ fprintf(stderr, "%s", msg);
41 # else
42 mexPrintf( msg );
43 # endif /* DEBUG_MW */
44--- a/src/ParallelImp.c
45+++ b/src/ParallelImp.c
46@@ -920,7 +920,7 @@
47 void report_error(char *msg)
48 {
49 #ifndef DEBUG_MW
50- fprintf(stderr, msg);
51+ fprintf(stderr, "%s", msg);
52 #else
53 mexWarnMsgTxt( msg );
54 #endif /* DEBUG_MW */
55@@ -938,7 +938,7 @@
56 void report(char *msg)
57 {
58 #ifdef DEBUG
59- fprintf(stderr, msg);
60+ fprintf(stderr, "%s", msg);
61 #endif /* DEBUG */
62 }
63
64--- a/src/SerialImp.cpp
65+++ b/src/SerialImp.cpp
66@@ -1844,7 +1844,7 @@
67
68
69 #ifdef DEBUG
70- fprintf(stderr, msg);
71+ fprintf(stderr, "%s", msg);
72 #endif
73 }
74
75--- a/CNI/SerialImp.c
76+++ b/CNI/SerialImp.c
77@@ -4549,7 +4549,7 @@
78 void report_warning(char *msg)
79 {
80 #ifndef DEBUG_MW
81- fprintf(stderr, msg);
82+ fprintf(stderr, "%s", msg);
83 #else
84 mexWarnMsgTxt( (const char *) msg );
85 #endif /* DEBUG_MW */
86@@ -4570,7 +4570,7 @@
87 #ifdef DEBUG_MW
88 mexErrMsgTxt( msg );
89 #else
90- fprintf(stderr, msg);
91+ fprintf(stderr, "%s", msg);
92 #endif /* DEBUG_MW */
93 #endif /* DEBUG_VERBOSE */
94 }
95@@ -4586,7 +4586,7 @@
96 void report_error(char *msg)
97 {
98 #ifndef DEBUG_MW
99- fprintf(stderr, msg);
100+ fprintf(stderr, "%s", msg);
101 #else
102 mexWarnMsgTxt( msg );
103 #endif /* DEBUG_MW */
104@@ -4605,7 +4605,7 @@
105 {
106 #ifdef DEBUG
107 # ifndef DEBUG_MW
108- fprintf(stderr, msg);
109+ fprintf(stderr, "%s", msg);
110 # else
111 mexPrintf( msg );
112 # endif /* DEBUG_MW */