summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-04-23 18:09:43 +0200
committerPetr Mladek <pmladek@suse.cz>2013-04-29 09:43:42 +0000
commitc7027a046fdd2aa19aa8d7bc80a59ed1559bbe4b (patch)
tree09bc3128fcedfa9f74bac1344dc9b79797a6ed55
parentUploading new fresh wonderful libvisio-0.0.26 (diff)
downloadcore-c7027a046fdd2aa19aa8d7bc80a59ed1559bbe4b.tar.gz
core-c7027a046fdd2aa19aa8d7bc80a59ed1559bbe4b.zip
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@documentfoundation.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi> Tested-by: Petr Mladek <pmladek@suse.cz> Reviewed-by: Petr Mladek <pmladek@suse.cz>
-rw-r--r--sc/source/core/data/column2.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 2bdb401c45b7..c782f89ed53b 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
{