From 37ce949745d3e31d6b4923c57259b86799876f11 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 28 Feb 2011 22:28:53 +0300 Subject: [PATCH] msxml3: Always set out pointer to null on failed QueryInterface. --- dlls/msxml3/attribute.c | 1 + dlls/msxml3/bsc.c | 1 + dlls/msxml3/cdata.c | 7 +------ dlls/msxml3/comment.c | 1 + dlls/msxml3/docfrag.c | 1 + dlls/msxml3/doctype.c | 1 + dlls/msxml3/domimpl.c | 1 + dlls/msxml3/element.c | 1 + dlls/msxml3/entityref.c | 1 + dlls/msxml3/factory.c | 1 + dlls/msxml3/nodemap.c | 1 + dlls/msxml3/parseerror.c | 1 + dlls/msxml3/pi.c | 1 + dlls/msxml3/schema.c | 1 + dlls/msxml3/stylesheet.c | 1 + dlls/msxml3/text.c | 8 +------- dlls/msxml3/xmldoc.c | 1 + dlls/msxml3/xmlelem.c | 1 + 18 files changed, 18 insertions(+), 13 deletions(-) diff --git a/dlls/msxml3/attribute.c b/dlls/msxml3/attribute.c index 60af5a43fe..170f632647 100644 --- a/dlls/msxml3/attribute.c +++ b/dlls/msxml3/attribute.c @@ -77,6 +77,7 @@ static HRESULT WINAPI domattr_QueryInterface( else { FIXME("Unsupported interface %s\n", debugstr_guid(riid)); + *ppvObject = NULL; return E_NOINTERFACE; } diff --git a/dlls/msxml3/bsc.c b/dlls/msxml3/bsc.c index b57e2b128a..9a8be97c9c 100644 --- a/dlls/msxml3/bsc.c +++ b/dlls/msxml3/bsc.c @@ -74,6 +74,7 @@ static HRESULT WINAPI bsc_QueryInterface( } TRACE("interface %s not implemented\n", debugstr_guid(riid)); + *ppobj = NULL; return E_NOINTERFACE; } diff --git a/dlls/msxml3/cdata.c b/dlls/msxml3/cdata.c index 16c2df283f..cdcebb09d1 100644 --- a/dlls/msxml3/cdata.c +++ b/dlls/msxml3/cdata.c @@ -70,12 +70,6 @@ static HRESULT WINAPI domcdata_QueryInterface( { *ppvObject = iface; } - else if ( IsEqualGUID( riid, &IID_IXMLDOMText ) || - IsEqualGUID( riid, &IID_IXMLDOMElement ) ) - { - TRACE("Unsupported interface\n"); - return E_NOINTERFACE; - } else if(node_query_interface(&This->node, riid, ppvObject)) { return *ppvObject ? S_OK : E_NOINTERFACE; @@ -83,6 +77,7 @@ static HRESULT WINAPI domcdata_QueryInterface( else { FIXME("Unsupported interface %s\n", debugstr_guid(riid)); + *ppvObject = NULL; return E_NOINTERFACE; } diff --git a/dlls/msxml3/comment.c b/dlls/msxml3/comment.c index 435c4af83a..433cca9935 100644 --- a/dlls/msxml3/comment.c +++ b/dlls/msxml3/comment.c @@ -77,6 +77,7 @@ static HRESULT WINAPI domcomment_QueryInterface( else { FIXME("Unsupported interface %s\n", debugstr_guid(riid)); + *ppvObject = NULL; return E_NOINTERFACE; } diff --git a/dlls/msxml3/docfrag.c b/dlls/msxml3/docfrag.c index 5862b6f85d..89b82a9ea6 100644 --- a/dlls/msxml3/docfrag.c +++ b/dlls/msxml3/docfrag.c @@ -76,6 +76,7 @@ static HRESULT WINAPI domfrag_QueryInterface( else { FIXME("Unsupported interface %s\n", debugstr_guid(riid)); + *ppvObject = NULL; return E_NOINTERFACE; } diff --git a/dlls/msxml3/doctype.c b/dlls/msxml3/doctype.c index ff939fcd22..9ebe1f045f 100644 --- a/dlls/msxml3/doctype.c +++ b/dlls/msxml3/doctype.c @@ -78,6 +78,7 @@ static HRESULT WINAPI domdoctype_QueryInterface( else { FIXME("interface %s not implemented\n", debugstr_guid(riid)); + *ppvObject = NULL; return E_NOINTERFACE; } diff --git a/dlls/msxml3/domimpl.c b/dlls/msxml3/domimpl.c index 2e35d98292..54936bb4ca 100644 --- a/dlls/msxml3/domimpl.c +++ b/dlls/msxml3/domimpl.c @@ -70,6 +70,7 @@ static HRESULT WINAPI dimimpl_QueryInterface( else { FIXME("Unsupported interface %s\n", debugstr_guid(riid)); + *ppvObject = NULL; return E_NOINTERFACE; } diff --git a/dlls/msxml3/element.c b/dlls/msxml3/element.c index 9573de9d52..b1de8df539 100644 --- a/dlls/msxml3/element.c +++ b/dlls/msxml3/element.c @@ -86,6 +86,7 @@ static HRESULT WINAPI domelem_QueryInterface( else { FIXME("interface %s not implemented\n", debugstr_guid(riid)); + *ppvObject = NULL; return E_NOINTERFACE; } diff --git a/dlls/msxml3/entityref.c b/dlls/msxml3/entityref.c index 1c3bd7d7f7..add4d8a543 100644 --- a/dlls/msxml3/entityref.c +++ b/dlls/msxml3/entityref.c @@ -76,6 +76,7 @@ static HRESULT WINAPI entityref_QueryInterface( else { FIXME("Unsupported interface %s\n", debugstr_guid(riid)); + *ppvObject = NULL; return E_NOINTERFACE; } diff --git a/dlls/msxml3/factory.c b/dlls/msxml3/factory.c index 5cce95b61a..027506c675 100644 --- a/dlls/msxml3/factory.c +++ b/dlls/msxml3/factory.c @@ -80,6 +80,7 @@ static HRESULT WINAPI ClassFactory_QueryInterface( } FIXME("interface %s not implemented\n", debugstr_guid(riid)); + *ppobj = NULL; return E_NOINTERFACE; } diff --git a/dlls/msxml3/nodemap.c b/dlls/msxml3/nodemap.c index b05192bdcb..6df10283c8 100644 --- a/dlls/msxml3/nodemap.c +++ b/dlls/msxml3/nodemap.c @@ -82,6 +82,7 @@ static HRESULT WINAPI xmlnodemap_QueryInterface( else { FIXME("interface %s not implemented\n", debugstr_guid(riid)); + *ppvObject = NULL; return E_NOINTERFACE; } diff --git a/dlls/msxml3/parseerror.c b/dlls/msxml3/parseerror.c index a3f400a464..3f5c59f45e 100644 --- a/dlls/msxml3/parseerror.c +++ b/dlls/msxml3/parseerror.c @@ -71,6 +71,7 @@ static HRESULT WINAPI parseError_QueryInterface( else { FIXME("interface %s not implemented\n", debugstr_guid(riid)); + *ppvObject = NULL; return E_NOINTERFACE; } diff --git a/dlls/msxml3/pi.c b/dlls/msxml3/pi.c index 6c5361a7b4..335b58445d 100644 --- a/dlls/msxml3/pi.c +++ b/dlls/msxml3/pi.c @@ -76,6 +76,7 @@ static HRESULT WINAPI dom_pi_QueryInterface( else { FIXME("Unsupported interface %s\n", debugstr_guid(riid)); + *ppvObject = NULL; return E_NOINTERFACE; } diff --git a/dlls/msxml3/schema.c b/dlls/msxml3/schema.c index e43aeb4cc6..e2bf8b34e7 100644 --- a/dlls/msxml3/schema.c +++ b/dlls/msxml3/schema.c @@ -948,6 +948,7 @@ static HRESULT WINAPI schema_cache_QueryInterface(IXMLDOMSchemaCollection2* ifac else { FIXME("interface %s not implemented\n", debugstr_guid(riid)); + *ppvObject = NULL; return E_NOINTERFACE; } diff --git a/dlls/msxml3/stylesheet.c b/dlls/msxml3/stylesheet.c index 5bde047ca8..00ba3cade5 100644 --- a/dlls/msxml3/stylesheet.c +++ b/dlls/msxml3/stylesheet.c @@ -96,6 +96,7 @@ static HRESULT WINAPI xsltemplate_QueryInterface( else { FIXME("Unsupported interface %s\n", debugstr_guid(riid)); + *ppvObject = NULL; return E_NOINTERFACE; } diff --git a/dlls/msxml3/text.c b/dlls/msxml3/text.c index 8036d32cda..b17d1d408b 100644 --- a/dlls/msxml3/text.c +++ b/dlls/msxml3/text.c @@ -75,16 +75,10 @@ static HRESULT WINAPI domtext_QueryInterface( { return *ppvObject ? S_OK : E_NOINTERFACE; } - else if ( IsEqualGUID( riid, &IID_IXMLDOMElement ) || - IsEqualGUID( riid, &IID_IXMLDOMCDATASection ) ) - { - /* IXMLDOMText is known to be correct in not implementing these */ - TRACE("Unsupported interface\n"); - return E_NOINTERFACE; - } else { FIXME("Unsupported interface %s\n", debugstr_guid(riid)); + *ppvObject = NULL; return E_NOINTERFACE; } diff --git a/dlls/msxml3/xmldoc.c b/dlls/msxml3/xmldoc.c index b833ba22be..a9d1dd8d66 100644 --- a/dlls/msxml3/xmldoc.c +++ b/dlls/msxml3/xmldoc.c @@ -95,6 +95,7 @@ static HRESULT WINAPI xmldoc_QueryInterface(IXMLDocument *iface, REFIID riid, vo else { FIXME("interface %s not implemented\n", debugstr_guid(riid)); + *ppvObject = NULL; return E_NOINTERFACE; } diff --git a/dlls/msxml3/xmlelem.c b/dlls/msxml3/xmlelem.c index 19e81942c7..9e08cc2ab6 100644 --- a/dlls/msxml3/xmlelem.c +++ b/dlls/msxml3/xmlelem.c @@ -75,6 +75,7 @@ static HRESULT WINAPI xmlelem_QueryInterface(IXMLElement *iface, REFIID riid, vo else { FIXME("interface %s not implemented\n", debugstr_guid(riid)); + *ppvObject = NULL; return E_NOINTERFACE; }