Permalink
Browse files

Merge pull request #629 from gnustomp/master

Fix potential format string vulnerabilities
  • Loading branch information...
joncampbell123 committed Mar 21, 2018
2 parents 13f4c43 + 98f3783 commit 8ebf2e221b3bf063925a22f30540d1ac473bc4f8
Showing with 4 additions and 4 deletions.
  1. +1 −1 src/dos/dos_memory.cpp
  2. +1 −1 src/gui/midi_mt32.h
  3. +1 −1 src/gui/sdl_mapper.cpp
  4. +1 −1 src/hardware/pc98_fm.cpp
View
@@ -68,7 +68,7 @@ static void DOS_Mem_E_Exit(const char *msg) {
LOG_MSG("DOS fatal memory error: %s",msg);
throw int(7); // DOS non-fatal error (restart when debugger runs again)
#else
E_Exit(msg);
E_Exit("%s",msg);
#endif
}
View
@@ -249,7 +249,7 @@ void MidiHandler_mt32::MT32ReportHandler::printDebug(const char *fmt, va_list li
char s[1024];
strcpy(s, "MT32: ");
vsnprintf(s + 6, 1017, fmt, list);
LOG_MSG(s);
LOG_MSG("%s", s);
}
}
View
@@ -2870,7 +2870,7 @@ void BIND_MappingEvents(void) {
tmp[tmpl] = 0;
LOG(LOG_GUI,LOG_DEBUG)("Mapper keyboard event: %s",tmp);
bind_but.dbg->Change(tmp);
bind_but.dbg->Change("%s",tmp);
event_count++;
}
/* fall through to mapper UI processing */
View
@@ -56,7 +56,7 @@ extern "C" void _TRACEOUT(const char *fmt,...) {
void getbiospath(OEMCHAR *path, const OEMCHAR *fname, int maxlen) {
LOG_MSG("PC98FM getbiospath fname='%s'",fname);
snprintf(path,maxlen,fname);
snprintf(path,maxlen,"%s",fname);
}
enum {

0 comments on commit 8ebf2e2

Please sign in to comment.