winaccessibility/source/UAccCOM/MAccessible.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit 585d54cd6b6c1f223425d8ba9233053727a5b0fe Author: Steve Yin <stev...@apache.org> Date: Mon Jan 27 05:49:26 2014 +0000 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 113171f2a5d726af6c5266e98e8e790ac6729d2d) Conflicts: winaccessibility/source/UAccCOM/MAccessible.cxx Change-Id: I28d4b885a6c2db487c2754c2ca11290b3844570b Reviewed-on: https://gerrit.libreoffice.org/7689 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index 4da2165..5fb1172 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -378,8 +378,8 @@ STDMETHODIMP CMAccessible::get_accChild(VARIANT varChild, IDispatch **ppdispChil return S_OK; } *ppdispChild = GetChildInterface(varChild.lVal); - if (!(*ppdispChild)) - return S_FALSE; + if((*ppdispChild) == NULL) + return E_FAIL; (*ppdispChild)->AddRef(); return S_OK; } @@ -1709,6 +1709,7 @@ STDMETHODIMP CMAccessible::get_nRelations( long __RPC_FAR *nRelations) SolarMutexGuard g; ENTER_PROTECTED_BLOCK + ISDESTROY() // #CHECK# if(nRelations == NULL) @@ -1802,6 +1803,7 @@ STDMETHODIMP CMAccessible::get_relations( long, IAccessibleRelation __RPC_FAR *_ SolarMutexGuard g; ENTER_PROTECTED_BLOCK + ISDESTROY() // #CHECK# if(relation == NULL || nRelations == NULL) @@ -3311,6 +3313,9 @@ STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *pAttr) { SolarMutexGuard g; + ENTER_PROTECTED_BLOCK + ISDESTROY() + Reference<XAccessibleContext> pRContext = m_xAccessible->getAccessibleContext(); if( !pRContext.is() ) { @@ -3334,6 +3339,7 @@ STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *pAttr) return S_OK; } + LEAVE_PROTECTED_BLOCK } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits