Package: visualboyadvance / 1.8.0.dfsg-4

13_debugger_format.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: Etienne Millon <etienne.millon@gmail.com>
Subject: Fix format string bug in debugging code
--- a/src/sdl/debugger.cpp
+++ b/src/sdl/debugger.cpp
@@ -511,7 +511,7 @@
   for(i = 0; i < t->enumeration->count; i++) {
     EnumMember *m = (EnumMember *)&t->enumeration->members[i];
     if(value == m->value) {
-      printf(m->name);
+      printf("%s", m->name);
       return;
     }
   }
@@ -2542,7 +2542,7 @@
 /*extern*/ void debuggerOutput(char *s, u32 addr)
 {
   if(s)
-    printf(s);
+    printf("%s", s);
   else {
     char c;