This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO41X by this push:
     new e467b8b3c9 Use after Free
e467b8b3c9 is described below

commit e467b8b3c91f261373da5f181866ead4a014a21c
Author: Pedro Giffuni <p...@apache.org>
AuthorDate: Tue Nov 24 15:31:03 2015 +0000

    Use after Free
    
    CID:    1158520
    
    git-svn-id: https://svn.apache.org/repos/asf/openoffice/trunk@1716173 
13f79535-47bb-0310-9956-ffa450edef68
    (cherry picked from commit 47edcb93f4af8a248c85b99626a69d12acc672b7)
---
 main/sw/source/core/access/accpara.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/main/sw/source/core/access/accpara.cxx 
b/main/sw/source/core/access/accpara.cxx
index 4f71290511..d2bb52a5f3 100644
--- a/main/sw/source/core/access/accpara.cxx
+++ b/main/sw/source/core/access/accpara.cxx
@@ -3811,7 +3811,8 @@ sal_Bool SAL_CALL SwAccessibleParagraph::removeSelection( 
sal_Int32 selectionInd
                        }
             // 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) );
        }

Reply via email to