Commit f5d183e2 authored by Bruno Jesus's avatar Bruno Jesus Committed by Alexandre Julliard

msadp32.acm: Ensure we have enough memory before memcopying data.

parent 4e01388a
......@@ -542,6 +542,8 @@ static LRESULT ADPCM_FormatSuggest(PACMDRVFORMATSUGGEST adfs)
if (ADPCM_GetFormatIndex(adfs->pwfxDst) == 0xFFFFFFFF) return ACMERR_NOTPOSSIBLE;
break;
case WAVE_FORMAT_ADPCM:
if (adfs->cbwfxDst < sizeof(ADPCMWAVEFORMAT) + (7 - 1) * sizeof(ADPCMCOEFSET))
return ACMERR_NOTPOSSIBLE;
init_wfx_adpcm((ADPCMWAVEFORMAT*)adfs->pwfxDst);
/* check if result is ok */
if (ADPCM_GetFormatIndex(adfs->pwfxDst) == 0xFFFFFFFF) return ACMERR_NOTPOSSIBLE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment