msacm32: Catch NULL parameters in acmFormatSuggest().

This commit is contained in:
Bruno Jesus 2015-09-09 12:10:32 +08:00 committed by Alexandre Julliard
parent f5d183e20e
commit d08197f92a
1 changed files with 3 additions and 0 deletions

View File

@ -676,6 +676,9 @@ MMRESULT WINAPI acmFormatSuggest(HACMDRIVER had, PWAVEFORMATEX pwfxSrc,
TRACE("(%p, %p, %p, %d, %d)\n", TRACE("(%p, %p, %p, %d, %d)\n",
had, pwfxSrc, pwfxDst, cbwfxDst, fdwSuggest); had, pwfxSrc, pwfxDst, cbwfxDst, fdwSuggest);
if (!pwfxSrc || !pwfxDst)
return MMSYSERR_INVALPARAM;
if (fdwSuggest & ~(ACM_FORMATSUGGESTF_NCHANNELS|ACM_FORMATSUGGESTF_NSAMPLESPERSEC| if (fdwSuggest & ~(ACM_FORMATSUGGESTF_NCHANNELS|ACM_FORMATSUGGESTF_NSAMPLESPERSEC|
ACM_FORMATSUGGESTF_WBITSPERSAMPLE|ACM_FORMATSUGGESTF_WFORMATTAG)) ACM_FORMATSUGGESTF_WBITSPERSAMPLE|ACM_FORMATSUGGESTF_WFORMATTAG))
return MMSYSERR_INVALFLAG; return MMSYSERR_INVALFLAG;