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

Alexandre Julliard julliard at wine.codeweavers.com
Wed Sep 9 09:57:36 CDT 2015


Module: wine
Branch: master
Commit: f5d183e20eefc041e118da4c37e3465a6ba9583f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f5d183e20eefc041e118da4c37e3465a6ba9583f

Author: Bruno Jesus <00cpxxx at gmail.com>
Date:   Wed Sep  9 12:10:21 2015 +0800

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

---

 dlls/msadp32.acm/msadp32.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/msadp32.acm/msadp32.c b/dlls/msadp32.acm/msadp32.c
index 83d1b46..2c61575 100644
--- a/dlls/msadp32.acm/msadp32.c
+++ b/dlls/msadp32.acm/msadp32.c
@@ -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;




More information about the wine-cvs mailing list