msadp32.acm: Ensure we have enough memory before memcopying data.
This commit is contained in:
parent
4e01388a32
commit
f5d183e20e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue