=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: xaudio2_7: Check return of IAudioClient_Start (Coverity).

Alexandre Julliard julliard at winehq.org
Thu Jun 16 03:45:39 CDT 2016


Module: wine
Branch: stable
Commit: 850ac564e4160251d6fef97da5eb0b75ead06be4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=850ac564e4160251d6fef97da5eb0b75ead06be4

Author: André Hentschel <nerv at dawncrow.de>
Date:   Tue Dec 22 19:34:57 2015 +0100

xaudio2_7: Check return of IAudioClient_Start (Coverity).

Signed-off-by: André Hentschel <nerv at dawncrow.de>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 35eebeef0fe0b3f03f44731f805c447b2342acfd)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/xaudio2_7/xaudio_dll.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c
index 73e6db1..50480ef 100644
--- a/dlls/xaudio2_7/xaudio_dll.c
+++ b/dlls/xaudio2_7/xaudio_dll.c
@@ -1700,7 +1700,13 @@ static HRESULT WINAPI IXAudio2Impl_CreateMasteringVoice(IXAudio2 *iface,
         goto exit;
     }
 
-    IAudioClient_Start(This->aclient);
+    hr = IAudioClient_Start(This->aclient);
+    if (FAILED(hr))
+    {
+        WARN("Start(IAudioClient) failed: %08x\n", hr);
+        hr = COMPAT_E_DEVICE_INVALIDATED(This->version);
+        goto exit;
+    }
 
     if(This->version <= 20)
         *ppMasteringVoice = (IXAudio2MasteringVoice*)&This->IXAudio20MasteringVoice_iface;




More information about the wine-cvs mailing list