summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-26 12:50:20 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2019-08-27 14:12:27 +0200
commit31adab13a57ce5ff67012946cccf2a5bb198add9 (patch)
tree2a399011ccbfe0f356186fe6729db7190909d0c3
parent3493519f27264f0f9e1ac8413a68df10ac56d192 (diff)
forcepoint #31 check validity of another group range
Change-Id: I82ff3e47a033c91581b108e1685b1ff4d5865895 Reviewed-on: https://gerrit.libreoffice.org/51883 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
-rw-r--r--sc/source/core/data/column3.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index a649e18ac6eb..950d72a8192b 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -3026,6 +3026,8 @@ public:
{
// Previous cell is a regular cell and current cell is a group.
nRow += xCurGrp->mnLength;
+ if (xCurGrp->mnLength > std::distance(it, itEnd))
+ throw css::lang::IllegalArgumentException();
std::advance(it, xCurGrp->mnLength);
pPrev->SetCellGroup(xCurGrp);
xCurGrp->mpTopCell = pPrev;