sc/source/core/data/dociter.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit 541fbcd2fae54a7b8bce25873d4d1b4891c1c796 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Wed Sep 26 20:01:20 2012 +0200 don't access out of bound array index, fdo#55022 Change-Id: Ica088822055b2fb5bbd6dabe6482b7cb6c472c48 Signed-off-by: Michael Meeks <michael.me...@suse.com> diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index 92c7cbd..187a327 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -568,7 +568,11 @@ bool ScDBQueryDataIterator::DataAccessInternal::getCurrent(Value& rValue) SCROW nThisRow = ScDBQueryDataIterator::GetRowByColEntryIndex(*mpDoc, nTab, nCol, nColRow); while ( (nColRow < nCellCount) && (nThisRow < nRow) ) - nThisRow = ScDBQueryDataIterator::GetRowByColEntryIndex(*mpDoc, nTab, nCol, ++nColRow); + { + ++nColRow; + if(nColRow < nCellCount) + nThisRow = ScDBQueryDataIterator::GetRowByColEntryIndex(*mpDoc, nTab, nCol, nColRow); + } if ( nColRow < nCellCount && nThisRow <= mpParam->nRow2 ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits