diff options
author | Steve Yin <steve_y@apache.org> | 2014-01-27 05:49:26 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-27 11:44:40 +0000 |
commit | ff8cb18e21e95e51239f736a525016db689653f0 (patch) | |
tree | 58c0fbabaec0b2932f4bd45a0f4b9030fd468244 /winaccessibility/source/UAccCOM/MAccessible.cxx | |
parent | 68ba6ddef50ec4aa92f55fa610c84c9f0d134e67 (diff) |
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
Diffstat (limited to 'winaccessibility/source/UAccCOM/MAccessible.cxx')
-rw-r--r-- | winaccessibility/source/UAccCOM/MAccessible.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index 4cba97c678b5..5a626428ef87 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -379,8 +379,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; } @@ -1710,6 +1710,7 @@ STDMETHODIMP CMAccessible::get_nRelations( long __RPC_FAR *nRelations) SolarMutexGuard g; ENTER_PROTECTED_BLOCK + ISDESTROY() // #CHECK# if(nRelations == NULL) @@ -1803,6 +1804,7 @@ STDMETHODIMP CMAccessible::get_relations( long, IAccessibleRelation __RPC_FAR *_ SolarMutexGuard g; ENTER_PROTECTED_BLOCK + ISDESTROY() // #CHECK# if(relation == NULL || nRelations == NULL) @@ -3312,6 +3314,9 @@ STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *pAttr) { SolarMutexGuard g; + ENTER_PROTECTED_BLOCK + ISDESTROY() + Reference<XAccessibleContext> pRContext = m_xAccessible->getAccessibleContext(); if( !pRContext.is() ) { @@ -3335,6 +3340,7 @@ STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *pAttr) return S_OK; } + LEAVE_PROTECTED_BLOCK } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |