https://git.reactos.org/?p=reactos.git;a=commitdiff;h=775e2aea3cc85508f8965660ab8486b1ec3869b6
commit 775e2aea3cc85508f8965660ab8486b1ec3869b6 Author: Mark Jansen <mark.jan...@reactos.org> AuthorDate: Sun Mar 18 15:56:59 2018 +0100 Commit: Mark Jansen <mark.jan...@reactos.org> CommitDate: Sun Mar 18 15:58:04 2018 +0100 [DSOUND] Check arguments in IDirectSoundFullDuplex::Initialize. This prevents a crash in winetest_dsound:duplex --- dll/directx/wine/dsound/duplex.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dll/directx/wine/dsound/duplex.c b/dll/directx/wine/dsound/duplex.c index dbee1b16ba..5ab498ba19 100644 --- a/dll/directx/wine/dsound/duplex.c +++ b/dll/directx/wine/dsound/duplex.c @@ -535,6 +535,9 @@ IDirectSoundFullDuplexImpl_Initialize( lpDscBufferDesc, lpDsBufferDesc, hWnd, dwLevel, lplpDirectSoundCaptureBuffer8, lplpDirectSoundBuffer8); + if (!lplpDirectSoundCaptureBuffer8 || !lplpDirectSoundBuffer8) + return E_INVALIDARG; + if (This->renderer_device != NULL || This->capture_device != NULL) { WARN("already initialized\n"); *lplpDirectSoundCaptureBuffer8 = NULL;