msxml3: Added checks for invalid arguments in nodelist.
This commit is contained in:
parent
212335e0b8
commit
01bd1c17c8
|
@ -66,6 +66,9 @@ static HRESULT WINAPI xmlnodelist_QueryInterface(
|
||||||
{
|
{
|
||||||
TRACE("%p %s %p\n", iface, debugstr_guid(riid), ppvObject);
|
TRACE("%p %s %p\n", iface, debugstr_guid(riid), ppvObject);
|
||||||
|
|
||||||
|
if(!ppvObject)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
if ( IsEqualGUID( riid, &IID_IUnknown ) ||
|
if ( IsEqualGUID( riid, &IID_IUnknown ) ||
|
||||||
IsEqualGUID( riid, &IID_IDispatch ) ||
|
IsEqualGUID( riid, &IID_IDispatch ) ||
|
||||||
IsEqualGUID( riid, &IID_IXMLDOMNodeList ) )
|
IsEqualGUID( riid, &IID_IXMLDOMNodeList ) )
|
||||||
|
@ -203,7 +206,10 @@ static HRESULT WINAPI xmlnodelist_get_item(
|
||||||
long nodeIndex = 0;
|
long nodeIndex = 0;
|
||||||
|
|
||||||
TRACE("%p %ld\n", This, index);
|
TRACE("%p %ld\n", This, index);
|
||||||
|
|
||||||
|
if(!listItem)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
*listItem = NULL;
|
*listItem = NULL;
|
||||||
|
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
|
@ -234,6 +240,9 @@ static HRESULT WINAPI xmlnodelist_get_length(
|
||||||
|
|
||||||
TRACE("%p\n", This);
|
TRACE("%p\n", This);
|
||||||
|
|
||||||
|
if(!listLength)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
curr = This->parent->children;
|
curr = This->parent->children;
|
||||||
while (curr)
|
while (curr)
|
||||||
{
|
{
|
||||||
|
@ -253,6 +262,9 @@ static HRESULT WINAPI xmlnodelist_nextNode(
|
||||||
|
|
||||||
TRACE("%p %p\n", This, nextItem );
|
TRACE("%p %p\n", This, nextItem );
|
||||||
|
|
||||||
|
if(!nextItem)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
*nextItem = NULL;
|
*nextItem = NULL;
|
||||||
|
|
||||||
if (!This->current)
|
if (!This->current)
|
||||||
|
|
Loading…
Reference in New Issue