openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@apache.org
Subject svn commit: r1561587 - /openoffice/trunk/main/winaccessibility/source/UAccCOM/MAccessible.cpp
Date Mon, 27 Jan 2014 05:49:26 GMT
Author: steve_y
Date: Mon Jan 27 05:49:26 2014
New Revision: 1561587

URL: http://svn.apache.org/r1561587
Log:
Bug 124095 - Multiple IAccessible and IAccessible2 interface methods do not check for NULL
pointer access, nor do they trap exceptions

Fixed by Michael Curran

Modified:
    openoffice/trunk/main/winaccessibility/source/UAccCOM/MAccessible.cpp

Modified: openoffice/trunk/main/winaccessibility/source/UAccCOM/MAccessible.cpp
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/winaccessibility/source/UAccCOM/MAccessible.cpp?rev=1561587&r1=1561586&r2=1561587&view=diff
==============================================================================
--- openoffice/trunk/main/winaccessibility/source/UAccCOM/MAccessible.cpp (original)
+++ openoffice/trunk/main/winaccessibility/source/UAccCOM/MAccessible.cpp Mon Jan 27 05:49:26
2014
@@ -353,8 +353,10 @@ STDMETHODIMP CMAccessible::get_accChild(
 				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_nRelation
 
 	CHECK_ENABLE_INF
 		ENTER_PROTECTED_BLOCK
+		ISDESTROY()
 
 		// #CHECK#
 		if(nRelations == NULL)
@@ -1748,6 +1751,7 @@ STDMETHODIMP CMAccessible::get_relations
 
 	CHECK_ENABLE_INF
 		ENTER_PROTECTED_BLOCK
+		ISDESTROY()
 
 		// #CHECK#
 		if(relation == NULL || nRelations == NULL)
@@ -3240,6 +3244,8 @@ STDMETHODIMP CMAccessible:: get_toolkitV
 
 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_attribute
 
 		return S_OK;
 	}
+	LEAVE_PROTECTED_BLOCK
 }
 



Mime
View raw message