Skip to content

Fix buffer overflow in setcontrol with 2 arguments

Hanicef requested to merge Hanicef/SRB2:setcontrol-buffer-overflow into next

While debugging another issue, I noticed that MemorySanitizer was firing off a buffer overflow error when the game launched. Turns out that there was a missing COM_Argc check in setcontrol, which caused it to try to get the third argument regardless if it was specified or not. This bug doesn't seem to impact anything in practice, but since MemorySanitizer is designed to detect bugs like this, I thought it'd be better just to send in a fix than to just ignore it.

Merge request reports