[PATCH 4/6] dmusic: Don't crash on NULL in IDirectMusicObject::GetDescriptor
Michael Stefaniuc
mstefani at redhat.de
Sun Jan 5 16:51:17 CST 2014
---
dlls/dmusic/collection.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/dmusic/collection.c b/dlls/dmusic/collection.c
index a519b2a..4c6a034 100644
--- a/dlls/dmusic/collection.c
+++ b/dlls/dmusic/collection.c
@@ -181,7 +181,9 @@ static HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicObject_GetDescripto
TRACE("(%p/%p)->(%p)\n", iface, This, pDesc);
- /* I think we shouldn't return pointer here since then values can be changed; it'd be a mess */
+ if (!pDesc)
+ return E_POINTER;
+
memcpy (pDesc, This->pDesc, This->pDesc->dwSize);
return S_OK;
--
1.8.3.1
More information about the wine-patches
mailing list