GBA: Zero DebugString buffer when handling messages
Thomas Winwood twwinwood@gmail.com
Mon, 06 Aug 2018 00:24:15 +0100
1 files changed,
1 insertions(+),
0 deletions(-)
jump to
M
src/gba/gba.c
→
src/gba/gba.c
@@ -525,6 +525,7 @@ int level = 1 << GBADebugFlagsGetLevel(gba->debugFlags);
level &= 0x1F; char oolBuf[0x101]; strncpy(oolBuf, gba->debugString, sizeof(gba->debugString)); + memset(gba->debugString, 0, sizeof(gba->debugString)); oolBuf[0x100] = '\0'; mLog(_mLOG_CAT_GBA_DEBUG(), level, "%s", oolBuf); }