[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sc/source
Michael Weghorn (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jan 23 21:09:57 UTC 2021
sc/source/core/data/dociter.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 234f50f5bf6a1f35fb23d983de56a8d86a9f2026
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Wed Jan 20 12:21:43 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Jan 23 22:09:09 2021 +0100
tdf#139782 sc: Don't try to access unallocated column
This fixes a regression from
commit 7282014e362a1529a36c88eb308df8ed359c2cfa
Date: Fri Feb 1 15:15:16 2019 +0100
tdf#50916 Makes numbers of columns dynamic.
Change-Id: I12a780bf52024cef31188651813d3a93cc2b5ddd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109704
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
(cherry picked from commit 3032cf9df042f50511a15c6a627c50f708a34238)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109787
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index eb110991140a..a10fcc48c43c 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -1798,6 +1798,10 @@ bool ScQueryCellIterator::BinarySearch()
assert(nTab < pDoc->GetTableCount() && "index out of bounds, FIX IT");
nCol = maParam.nCol1;
+
+ if (nCol >= pDoc->maTabs[nTab]->GetAllocatedColumnsCount())
+ return false;
+
ScColumn* pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
if (pCol->IsEmptyData())
return false;
More information about the Libreoffice-commits
mailing list