[Libreoffice-commits] core.git: sc/source

Eike Rathke erack at redhat.com
Tue Apr 23 09:26:38 PDT 2013


 sc/source/core/data/column2.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3874bad70ea48deed91b9966b3d35782b5584f7d
Author: Eike Rathke <erack at redhat.com>
Date:   Tue Apr 23 18:09:43 2013 +0200

    fixed out of bounds vector access
    
    in ScColumn::FindNextVisibleRowWithContent() if starting from the
    position all including the last present cell of a column are blank
    
    Change-Id: I0270331444f1707b6ad413f6127ae4c2cf0b1984

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 82f03cc..d0d53ea 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1353,7 +1353,7 @@ SCROW ScColumn::FindNextVisibleRowWithContent(SCROW nRow, bool bForward) const
             bool bThere = Search( nRow, nIndex );
             if( bThere && !maItems[nIndex].pCell->IsBlank())
                 return nRow;
-            else if(nIndex >= maItems.size())
+            else if((bThere ? nIndex+1 : nIndex) >= maItems.size())
                 return MAXROW;
             else
             {


More information about the Libreoffice-commits mailing list