Author: akhaldi
Date: Thu Nov 17 22:48:39 2016
New Revision: 73278
URL:
http://svn.reactos.org/svn/reactos?rev=73278&view=rev
Log:
[MSACM32] Sync with Wine Staging 1.9.23. CORE-12409
Modified:
trunk/reactos/dll/win32/msacm32/msacm32_main.c
trunk/reactos/dll/win32/msacm32/stream.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/msacm32/msacm32_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msacm32/msacm32_…
==============================================================================
--- trunk/reactos/dll/win32/msacm32/msacm32_main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msacm32/msacm32_main.c [iso-8859-1] Thu Nov 17 22:48:39 2016
@@ -72,6 +72,8 @@
switch (version.dwPlatformId) {
case VER_PLATFORM_WIN32_NT:
return 0x04000565; /* 4.0.1381 */
+ case VER_PLATFORM_WIN32s:
+ return 0x02010000; /* 2.1 */
default:
FIXME("%x not supported\n", version.dwPlatformId);
/* fall through */
Modified: trunk/reactos/dll/win32/msacm32/stream.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msacm32/stream.c…
==============================================================================
--- trunk/reactos/dll/win32/msacm32/stream.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msacm32/stream.c [iso-8859-1] Thu Nov 17 22:48:39 2016
@@ -37,6 +37,15 @@
return (PWINE_ACMSTREAM)has;
}
+static BOOL ACM_ValidatePointers(PACMDRVSTREAMHEADER padsh)
+{
+ /* check that pointers have not been modified */
+ return !(padsh->pbPreparedSrc != padsh->pbSrc ||
+ padsh->cbPreparedSrcLength < padsh->cbSrcLength ||
+ padsh->pbPreparedDst != padsh->pbDst ||
+ padsh->cbPreparedDstLength < padsh->cbDstLength);
+}
+
/***********************************************************************
* acmStreamClose (MSACM32.@)
*/
@@ -95,13 +104,9 @@
*/
padsh = (PACMDRVSTREAMHEADER)pash;
- /* check that pointers have not been modified */
- if (padsh->pbPreparedSrc != padsh->pbSrc ||
- padsh->cbPreparedSrcLength < padsh->cbSrcLength ||
- padsh->pbPreparedDst != padsh->pbDst ||
- padsh->cbPreparedDstLength < padsh->cbDstLength) {
- WARN("invalid parameter\n");
- return MMSYSERR_INVALPARAM;
+ if (!ACM_ValidatePointers(padsh)) {
+ WARN("invalid parameter\n");
+ return MMSYSERR_INVALPARAM;
}
padsh->fdwConvert = fdwConvert;
@@ -289,14 +294,21 @@
if ((was = ACM_GetStream(has)) == NULL) {
WARN("invalid handle\n");
- return MMSYSERR_INVALHANDLE;
+ return MMSYSERR_INVALHANDLE;
}
if (!pash || pash->cbStruct < sizeof(ACMSTREAMHEADER)) {
WARN("invalid parameter\n");
- return MMSYSERR_INVALPARAM;
- }
- if (fdwPrepare)
- ret = MMSYSERR_INVALFLAG;
+ return MMSYSERR_INVALPARAM;
+ }
+ if (fdwPrepare) {
+ WARN("invalid use of reserved parameter\n");
+ return MMSYSERR_INVALFLAG;
+ }
+ if (pash->cbSrcLength < was->drvInst.pwfxSrc->nBlockAlign) {
+ WARN("source smaller than block align (%d < %d)\n",
+ pash->cbSrcLength, was->drvInst.pwfxSrc->nBlockAlign);
+ return pash->cbSrcLength ? ACMERR_NOTPOSSIBLE : MMSYSERR_INVALPARAM;
+ }
/* Note: the ACMSTREAMHEADER and ACMDRVSTREAMHEADER structs are of same
* size. some fields are private to msacm internals, and are exposed
@@ -447,13 +459,9 @@
*/
padsh = (PACMDRVSTREAMHEADER)pash;
- /* check that pointers have not been modified */
- if (padsh->pbPreparedSrc != padsh->pbSrc ||
- padsh->cbPreparedSrcLength < padsh->cbSrcLength ||
- padsh->pbPreparedDst != padsh->pbDst ||
- padsh->cbPreparedDstLength < padsh->cbDstLength) {
- WARN("invalid parameter\n");
- return MMSYSERR_INVALPARAM;
+ if (!ACM_ValidatePointers(padsh)) {
+ WARN("invalid parameter\n");
+ return MMSYSERR_INVALPARAM;
}
padsh->fdwConvert = fdwUnprepare;
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] Thu Nov 17 22:48:39 2016
@@ -100,7 +100,7 @@
reactos/dll/win32/mmdevapi # Synced to WineStaging-1.9.23
reactos/dll/win32/mpr # Synced to WineStaging-1.9.11
reactos/dll/win32/mprapi # Synced to WineStaging-1.9.11
-reactos/dll/win32/msacm32 # Synced to WineStaging-1.9.11
+reactos/dll/win32/msacm32 # Synced to WineStaging-1.9.23
reactos/dll/win32/msacm32.drv # Synced to WineStaging-1.9.11
reactos/dll/win32/msadp32.acm # Synced to WineStaging-1.9.11
reactos/dll/win32/mscat32 # Synced to WineStaging-1.9.11