parameter checking in CoMarshalInterface
Aric Stewart
aric at codeweavers.com
Tue Jun 29 10:26:49 CDT 2004
Changlog: return an error if the IUnknown pointer is NULL and dont crash
tested with win2k and this is proper behavior
-------------- next part --------------
Index: dlls/ole32/marshal.c
===================================================================
RCS file: /home/wine/wine/dlls/ole32/marshal.c,v
retrieving revision 1.19
diff -u -w -r1.19 marshal.c
--- dlls/ole32/marshal.c 17 Jun 2004 19:55:24 -0000 1.19
+++ dlls/ole32/marshal.c 29 Jun 2004 15:25:30 -0000
@@ -453,6 +453,10 @@
TRACE("(%p, %s, %p, %lx, %p, %lx)\n",
pStm,debugstr_guid(riid),pUnk,dwDestContext,pvDestContext,mshlflags
);
+
+ if (pUnk == NULL)
+ return E_INVALIDARG;
+
STUBMGR_Start(); /* Just to be sure we have one running. */
mid.processid = GetCurrentProcessId();
IUnknown_QueryInterface(pUnk,&IID_IUnknown,(LPVOID*)&pUnknown);
More information about the wine-patches
mailing list