From 775e2aea3cc85508f8965660ab8486b1ec3869b6 Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Sun, 18 Mar 2018 15:56:59 +0100 Subject: [PATCH] [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 dbee1b16ba6..5ab498ba199 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; -- 2.17.1