Author: akhaldi
Date: Mon Nov 23 08:55:46 2015
New Revision: 70045
URL:
http://svn.reactos.org/svn/reactos?rev=70045&view=rev
Log:
[MSADP32.ACM] Sync with Wine Staging 1.7.55. CORE-10536
Modified:
trunk/reactos/dll/win32/msadp32.acm/msadp32.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/msadp32.acm/msadp32.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msadp32.acm/msad…
==============================================================================
--- trunk/reactos/dll/win32/msadp32.acm/msadp32.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msadp32.acm/msadp32.c [iso-8859-1] Mon Nov 23 08:55:46 2015
@@ -251,9 +251,17 @@
{
const unsigned char* in_src = src;
- assert(*src <= 6);
+ /* Catch a problem from Tomb Raider III (bug 21000) where it passes
+ * invalid data after a valid sequence of blocks */
+ if (*src > 6 || *(src + 1) > 6)
+ {
+ /* Recalculate the amount of used output buffer. We are not changing
+ * nsrc, let's assume the bad data was parsed */
+ *ndst -= nblock * nsamp_blk * adsi->pwfxDst->nBlockAlign;
+ WARN("Invalid ADPCM data, stopping conversion\n");
+ break;
+ }
coeffL = MSADPCM_CoeffSet[*src++];
- assert(*src <= 6);
coeffR = MSADPCM_CoeffSet[*src++];
ideltaL = R16(src); src += 2;
@@ -544,6 +552,8 @@
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;
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Mon Nov 23 08:55:46 2015
@@ -105,7 +105,7 @@
reactos/dll/win32/mprapi # Synced to WineStaging-1.7.47
reactos/dll/win32/msacm32 # Synced to WineStaging-1.7.55
reactos/dll/win32/msacm32/msacm32.drv # Synced to WineStaging-1.7.55
-reactos/dll/win32/msadp32.acm # Synced to WineStaging-1.7.47
+reactos/dll/win32/msadp32.acm # Synced to WineStaging-1.7.55
reactos/dll/win32/mscat32 # Synced to WineStaging-1.7.47
reactos/dll/win32/mscms # Synced to WineStaging-1.7.47
reactos/dll/win32/mscoree # Synced to Wine-1.5.4