Commit 01bd1c17 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

msxml3: Added checks for invalid arguments in nodelist.

parent 212335e0
......@@ -66,6 +66,9 @@ static HRESULT WINAPI xmlnodelist_QueryInterface(
{
TRACE("%p %s %p\n", iface, debugstr_guid(riid), ppvObject);
if(!ppvObject)
return E_INVALIDARG;
if ( IsEqualGUID( riid, &IID_IUnknown ) ||
IsEqualGUID( riid, &IID_IDispatch ) ||
IsEqualGUID( riid, &IID_IXMLDOMNodeList ) )
......@@ -203,7 +206,10 @@ static HRESULT WINAPI xmlnodelist_get_item(
long nodeIndex = 0;
TRACE("%p %ld\n", This, index);
if(!listItem)
return E_INVALIDARG;
*listItem = NULL;
if (index < 0)
......@@ -234,6 +240,9 @@ static HRESULT WINAPI xmlnodelist_get_length(
TRACE("%p\n", This);
if(!listLength)
return E_INVALIDARG;
curr = This->parent->children;
while (curr)
{
......@@ -253,6 +262,9 @@ static HRESULT WINAPI xmlnodelist_nextNode(
TRACE("%p %p\n", This, nextItem );
if(!nextItem)
return E_INVALIDARG;
*nextItem = NULL;
if (!This->current)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment