Resolve buffer overflow crash when configuring System Menu and GIF controls
This crash happened in OSX and Linux builds immediately upon attempting to config the System Menu and GIF controls.
The issue is that the program was trying to build the string,
Press a key for
Toggle GIF Recording
ESC to cancel
and the control name for Toggle GIF Recording
overflowed the string buffer by 2 chars.
I increased that buffer to support up to a 32 character control name for that template.
Merge request reports
Activity
added 1 commit
- d61eb7ed - Increase ChangeControl text buffer to resolve buffer overflow with System Menu/GIF control config
mentioned in merge request KartKrew/Kart-Public!8 (merged)
Toggle GIF Recording
andOpen/Close Menu (ESC)
are the only control names that are too long for the buffer, when it's subbed in bysprintf
. Every other control name was short enough to not crash.Windows just didn't crash because of how it's built, I guess. Like the 64-bit kick bug we discovered.
Edited by mazmazzGuess the way
sprintf
function works varies by platform, and some varients of the function have failsafes to prevent crashes for reasons like that. This fix looks good to me though!Edited by SteelTadded 1 commit
- c97dc5d3 - Increase M_ChangecontrolResponse message buffer by 25 chars
mentioned in commit d5870e6f