sc/source/core/data/dociter.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit 3c364f5d574515a257ba0bb84e199275fbea944f Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Mon Apr 15 06:54:31 2019 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Mon Apr 15 08:01:08 2019 +0200 Related: tdf#50916 create valid empty ScHorizontalCellIterator when... completely outside allocated area. Prevents crash in spell checker when scrolling into unallocated area, where first visible column number is greater than maximal allocated column number. The crash happened when std::vector::reserve threw std::length_error, and Scheduler::ProcessTaskScheduling abort()ed catching that in std::exception handler. Change-Id: Id74706f4a5fedfcc5e4e316c7aea7f5a4fe110be Reviewed-on: https://gerrit.libreoffice.org/70756 Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Tested-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index 174ff54c43e8..8458e2895684 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -1924,6 +1924,8 @@ ScHorizontalCellIterator::ScHorizontalCellIterator(ScDocument* pDocument, SCTAB OSL_FAIL("try to access index out of bounds, FIX IT"); nEndCol = pDoc->maTabs[mnTab]->ClampToAllocatedColumns(nEndCol); + if (nEndCol < nStartCol) // E.g., somewhere completely outside allocated area + nEndCol = nStartCol - 1; // Empty maColPositions.reserve( nEndCol-nStartCol+1 ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits