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

New commits:
commit c7027a046fdd2aa19aa8d7bc80a59ed1559bbe4b
Author: Eike Rathke <er...@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 <fridr...@documentfoundation.org>
    Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com>
    Reviewed-by: Tor Lillqvist <t...@iki.fi>
    Tested-by: Tor Lillqvist <t...@iki.fi>
    Tested-by: Petr Mladek <pmla...@suse.cz>
    Reviewed-by: Petr Mladek <pmla...@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
             {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to