Skip to content

Fix buffer overflow when loading addons through symlinks

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

When loading addons via a symlink, the buffer to the addon path could overflow if the total path exceeded 256 bytes. This happens because filesearch expects a path that is MAX_WADPATH long, which wasn't supplied by searchWad, causing it to overflow when expanding the absolute path. This patch fixes this by resizing the buffer to MAX_WADPATH bytes, giving it enough space to write the entire absolute path.

Merge request reports