aboutsummaryrefslogtreecommitdiffstats
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 @@
+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 */