Kaydet (Commit) ff8cb18e authored tarafından Steve Yin's avatar Steve Yin Kaydeden (comit) Caolán McNamara

Resolves: #i124095# Multiple IAccessible and IAccessible2...

interface methods do not check for NULL pointer access, nor do they trap
exceptions

Fixed by Michael Curran
(cherry picked from commit 113171f2)

Conflicts:
	winaccessibility/source/UAccCOM/MAccessible.cxx

Change-Id: I28d4b885a6c2db487c2754c2ca11290b3844570b
üst 68ba6dde
...@@ -379,8 +379,8 @@ STDMETHODIMP CMAccessible::get_accChild(VARIANT varChild, IDispatch **ppdispChil ...@@ -379,8 +379,8 @@ STDMETHODIMP CMAccessible::get_accChild(VARIANT varChild, IDispatch **ppdispChil
return S_OK; return S_OK;
} }
*ppdispChild = GetChildInterface(varChild.lVal); *ppdispChild = GetChildInterface(varChild.lVal);
if (!(*ppdispChild)) if((*ppdispChild) == NULL)
return S_FALSE; return E_FAIL;
(*ppdispChild)->AddRef(); (*ppdispChild)->AddRef();
return S_OK; return S_OK;
} }
...@@ -1710,6 +1710,7 @@ STDMETHODIMP CMAccessible::get_nRelations( long __RPC_FAR *nRelations) ...@@ -1710,6 +1710,7 @@ STDMETHODIMP CMAccessible::get_nRelations( long __RPC_FAR *nRelations)
SolarMutexGuard g; SolarMutexGuard g;
ENTER_PROTECTED_BLOCK ENTER_PROTECTED_BLOCK
ISDESTROY()
// #CHECK# // #CHECK#
if(nRelations == NULL) if(nRelations == NULL)
...@@ -1803,6 +1804,7 @@ STDMETHODIMP CMAccessible::get_relations( long, IAccessibleRelation __RPC_FAR *_ ...@@ -1803,6 +1804,7 @@ STDMETHODIMP CMAccessible::get_relations( long, IAccessibleRelation __RPC_FAR *_
SolarMutexGuard g; SolarMutexGuard g;
ENTER_PROTECTED_BLOCK ENTER_PROTECTED_BLOCK
ISDESTROY()
// #CHECK# // #CHECK#
if(relation == NULL || nRelations == NULL) if(relation == NULL || nRelations == NULL)
...@@ -3312,6 +3314,9 @@ STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *pAttr) ...@@ -3312,6 +3314,9 @@ STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *pAttr)
{ {
SolarMutexGuard g; SolarMutexGuard g;
ENTER_PROTECTED_BLOCK
ISDESTROY()
Reference<XAccessibleContext> pRContext = m_xAccessible->getAccessibleContext(); Reference<XAccessibleContext> pRContext = m_xAccessible->getAccessibleContext();
if( !pRContext.is() ) if( !pRContext.is() )
{ {
...@@ -3335,6 +3340,7 @@ STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *pAttr) ...@@ -3335,6 +3340,7 @@ STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *pAttr)
return S_OK; return S_OK;
} }
LEAVE_PROTECTED_BLOCK
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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