Kaydet (Commit) 113171f2 authored tarafından Steve Yin's avatar Steve Yin

Bug 124095 - Multiple IAccessible and IAccessible2 interface methods do not…

Bug 124095 - Multiple IAccessible and IAccessible2 interface methods do not check for NULL pointer access, nor do they trap exceptions

Fixed by Michael Curran
üst 58a2b4a7
......@@ -353,8 +353,10 @@ STDMETHODIMP CMAccessible::get_accChild(VARIANT varChild, IDispatch **ppdispChil
return S_OK;
}
*ppdispChild = GetChildInterface(varChild.lVal);
if((*ppdispChild) == NULL)
return E_FAIL;
(*ppdispChild)->AddRef();
return (*ppdispChild)?S_OK:S_FALSE;
return S_OK;
}
return S_FALSE;
......@@ -1653,6 +1655,7 @@ STDMETHODIMP CMAccessible::get_nRelations( long __RPC_FAR *nRelations)
CHECK_ENABLE_INF
ENTER_PROTECTED_BLOCK
ISDESTROY()
// #CHECK#
if(nRelations == NULL)
......@@ -1748,6 +1751,7 @@ STDMETHODIMP CMAccessible::get_relations( long, IAccessibleRelation __RPC_FAR *_
CHECK_ENABLE_INF
ENTER_PROTECTED_BLOCK
ISDESTROY()
// #CHECK#
if(relation == NULL || nRelations == NULL)
......@@ -3240,6 +3244,8 @@ STDMETHODIMP CMAccessible:: get_toolkitVersion(BSTR __RPC_FAR *version)
STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *pAttr)
{
ENTER_PROTECTED_BLOCK
ISDESTROY()
CHECK_ENABLE_INF
Reference<XAccessibleContext> pRContext = pUNOInterface->getAccessibleContext();
if( !pRContext.is() )
......@@ -3264,5 +3270,6 @@ STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *pAttr)
return S_OK;
}
LEAVE_PROTECTED_BLOCK
}
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