msacm32: Handle invalid use of reserved parameter in acmStreamPrepareHeader.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Bruno Jesus 2016-08-28 04:07:28 -03:00 committed by Alexandre Julliard
parent 2bc66dc073
commit 61eda97fd5
2 changed files with 6 additions and 5 deletions

View File

@ -302,14 +302,16 @@ MMRESULT WINAPI acmStreamPrepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash,
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;
return MMSYSERR_INVALPARAM;
}
if (fdwPrepare) {
WARN("invalid use of reserved parameter\n");
return MMSYSERR_INVALFLAG;
}
if (fdwPrepare)
ret = MMSYSERR_INVALFLAG;
/* Note: the ACMSTREAMHEADER and ACMDRVSTREAMHEADER structs are of same
* size. some fields are private to msacm internals, and are exposed

View File

@ -601,7 +601,6 @@ todo_wine
hdr.cbSrcLength = src->wfx.nBlockAlign;
mr = acmStreamPrepareHeader(has, &hdr, 1); /* invalid use of reserved parameter */
todo_wine
ok(mr == MMSYSERR_INVALFLAG, "expected 0x0a, got 0x%x\n", mr);
mr = acmStreamPrepareHeader(has, &hdr, 0);