Skip to content

Fix buffer overflow when displaying a scrolling background

Hanicef requested to merge Hanicef/SRB2:fix-overflow-scrolling-background into next

When scrolling background images are loaded, the buffer that stores the background image was not NULL-terminated. This triggered buffer overflows down the line, as the string is later copied and compared with strcpy/strcmp, which requires the string to be NULL-terminated. This bug shouldn't impact anything in practice, but ASAN still picked it up, so might as well fix it.

Merge request reports