Skip to content
Snippets Groups Projects
Commit 63f9a082 authored by Brandon Moore's avatar Brandon Moore Committed by Alexandre Julliard
Browse files

msadpm: Stop decoding instead of crashing for invalid adpcm data.


Apply the same patch from 72528be8 for adpcm data sent to mono
destinations in addition to stereo destinations.

Signed-off-by: default avatarBrandon Moore <moore.3071@osu.edu>
Signed-off-by: default avatarAndrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
parent 7a32bc9e
No related branches found
No related tags found
No related merge requests found
......@@ -319,7 +319,14 @@ static void cvtMMms16K(const ACMDRVSTREAMINSTANCE *adsi,
{
const unsigned char* in_src = src;
assert(*src <= 6);
/* Catch a problem from Lord of the Rings War of the Ring where it
* passes invalid data. */
if (*src > 6)
{
*ndst -= nblock * nsamp_blk * adsi->pwfxDst->nBlockAlign;
WARN("Invalid ADPCM data, stopping conversion\n");
break;
}
coeff = MSADPCM_CoeffSet[*src++];
idelta = R16(src); src += 2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment