PATCH: tmarshal / marshalling NULL pointers
Marcus Meissner
meissner at suse.de
Mon Mar 28 13:17:07 CST 2005
Hi,
At least one InstallShield Installer tries to send a VARIANT with
VT_DISPATCH and NULL pointer. Do not handle NULL pointers as
failure.
I kept the ERR() for now.
Ciao, Marcus
Changelog:
Serialize NULL pointer interfaces correctly.
Index: tmarshal.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/tmarshal.c,v
retrieving revision 1.49
diff -u -r1.49 tmarshal.c
--- dlls/oleaut32/tmarshal.c 28 Mar 2005 10:00:49 -0000 1.49
+++ dlls/oleaut32/tmarshal.c 28 Mar 2005 18:29:04 -0000
@@ -1,7 +1,7 @@
/*
* TYPELIB Marshaler
*
- * Copyright 2002 Marcus Meissner
+ * Copyright 2002,2005 Marcus Meissner
*
* The olerelay debug channel allows you to see calls marshalled by
* the typelib marshaller. It is not a generic COM relaying system.
@@ -169,12 +174,19 @@
DWORD xsize;
HRESULT hres;
- hres = E_FAIL;
if (!pUnk) {
+ /* this is valid, if for instance we serialize
+ * a VT_DISPATCH with NULL ptr which apparently
+ * can happen. S_OK to make sure we continue
+ * serializing.
+ */
ERR("pUnk is NULL?\n");
- goto fail;
+ xsize = 0;
+ return xbuf_add(buf,(LPBYTE)&xsize,sizeof(xsize));
}
+ hres = E_FAIL;
+
TRACE("...%s...\n",debugstr_guid(riid));
hres = IUnknown_QueryInterface(pUnk,riid,(LPVOID*)&newiface);
if (hres) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050328/1f3d5508/attachment.pgp
More information about the wine-patches
mailing list