You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by pf...@apache.org on 2015/11/24 16:31:04 UTC

svn commit: r1716173 - /openoffice/trunk/main/sw/source/core/access/accpara.cxx

Author: pfg
Date: Tue Nov 24 15:31:03 2015
New Revision: 1716173

URL: http://svn.apache.org/viewvc?rev=1716173&view=rev
Log:
Use after Free

CID:	1158520

Modified:
    openoffice/trunk/main/sw/source/core/access/accpara.cxx

Modified: openoffice/trunk/main/sw/source/core/access/accpara.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/access/accpara.cxx?rev=1716173&r1=1716172&r2=1716173&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/access/accpara.cxx (original)
+++ openoffice/trunk/main/sw/source/core/access/accpara.cxx Tue Nov 24 15:31:03 2015
@@ -3815,7 +3815,8 @@ sal_Bool SAL_CALL SwAccessibleParagraph:
 			}
             // else: this PaM is collapsed and doesn't select anything
 		   pPrev = pCrsr;
-           pCrsr = static_cast<SwPaM*>( pCrsr->GetNext() );
+           if(!bRet)
+               pCrsr = static_cast<SwPaM*>( pCrsr->GetNext() );
         }
         while( !bRet && (pCrsr != pRingStart) );
 	}