[Libreoffice-commits] core.git: Branch 'libreoffice-4-0-3' - sc/source

Eike Rathke erack at redhat.com
Mon Apr 29 02:44:02 PDT 2013


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

New commits:
commit c7027a046fdd2aa19aa8d7bc80a59ed1559bbe4b
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
    (cherry picked from commit 3874bad70ea48deed91b9966b3d35782b5584f7d)
    Reviewed-on: https://gerrit.libreoffice.org/3585
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Tor Lillqvist <tml at iki.fi>
    Tested-by: Tor Lillqvist <tml at iki.fi>
    Tested-by: Petr Mladek <pmladek at suse.cz>
    Reviewed-by: Petr Mladek <pmladek at suse.cz>

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 2bdb401..c782f89 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1347,7 +1347,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