Fix crash on launch reading out of bounds when loading some WAV files#140
Conversation
Crash appears to be caused by the code reading out of bounds mem when checking for the presence of "mark" inside the LIST chunk of certain WAV files. Possibly caused by badly authored WAV files, though I'm not sure exactly what the expected format & behaviour is here. Crash occurred when launching librequake v0.09-beta FULL version on an M2 Mac, though I do not think this is a Mac specific issue.
|
This is in. Thanks. |
|
@vsonnier, @andrei-drexler: vkquake and ironwail might need this, too. |
|
Thanks for the heads up! |
|
@sezero Thanks, cherry-picked on vk as well. |
|
@sezero @thomashope Are we sure of that patch ? I now see that warning quite often in mods, of simply starting the Remaster :
Looking a bit closely this Anyway, the Thoughts ? |
|
If it's considered valid to not have "mark" then the warning can be removed. I just assumed it was expected based on the existing code. I'm happy to submit a PR to remove it, or create a new PR without it if you want to revert this one. |
To be clear : for our case, if we have So, we just need to remove else
{
Con_Warning("%s contains bad LIST chunk\n", name);
} |
|
Was I too hasty merging? Shameful of me. Can you guys give me a tested follow-up patch? |
Is Novum/vkQuake@bd15df1 enough? |
I think so. |
OK, applied. |

Crash appears to be caused by reading out of bounds memory when checking for the presence of "mark" inside the LIST chunk of certain WAV files. Possibly caused by badly authored WAV files, though I'm not sure exactly what the expected format & behaviour is here.
Crash occurred when trying to run librequake v0.09-beta FULL version on an M2 Mac, but it does not look like a Mac specific issue imo.