msxml3: Added checks for invalid arguments in nodelist.

This commit is contained in:
Alistair Leslie-Hughes 2008-07-02 16:16:05 +10:00 committed by Alexandre Julliard
parent 212335e0b8
commit 01bd1c17c8
1 changed files with 13 additions and 1 deletions

View File

@ -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 ) )
@ -204,6 +207,9 @@ static HRESULT WINAPI xmlnodelist_get_item(
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)