Module: wine Branch: master Commit: d08197f92aab2c52f257488d134f3bfc3a1a2ff6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d08197f92aab2c52f257488d13...
Author: Bruno Jesus 00cpxxx@gmail.com Date: Wed Sep 9 12:10:32 2015 +0800
msacm32: Catch NULL parameters in acmFormatSuggest().
---
dlls/msacm32/format.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/msacm32/format.c b/dlls/msacm32/format.c index f7f0fa4..1ab05ae 100644 --- a/dlls/msacm32/format.c +++ b/dlls/msacm32/format.c @@ -676,6 +676,9 @@ MMRESULT WINAPI acmFormatSuggest(HACMDRIVER had, PWAVEFORMATEX pwfxSrc, TRACE("(%p, %p, %p, %d, %d)\n", had, pwfxSrc, pwfxDst, cbwfxDst, fdwSuggest);
+ if (!pwfxSrc || !pwfxDst) + return MMSYSERR_INVALPARAM; + if (fdwSuggest & ~(ACM_FORMATSUGGESTF_NCHANNELS|ACM_FORMATSUGGESTF_NSAMPLESPERSEC| ACM_FORMATSUGGESTF_WBITSPERSAMPLE|ACM_FORMATSUGGESTF_WFORMATTAG)) return MMSYSERR_INVALFLAG;