summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-26 09:23:48 +0100
committerAndras Timar <andras.timar@collabora.com>2018-04-12 10:54:30 +0200
commit190de6c787915456435c0d57cb08a55a5f94c1a1 (patch)
tree050b9bbcebda1d92ea36815cdd9592dad22c1cdb /sc/source
parentc9ab49f0eff4005bf273057b9f6b4e3f8099acdb (diff)
forcepoint #30 check validity of group range
Change-Id: Ie0611f36809b051ce46030e44c137b4e1f8d2fe0 Reviewed-on: https://gerrit.libreoffice.org/51864 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 6969f1fbfd1c8ead222af416ff86f30e2f74f00e)
Diffstat (limited to 'sc/source')
-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 961bf244df60..a50856290c35 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -3091,6 +3091,8 @@ public:
xPrevGrp->mnLength += xCurGrp->mnLength;
pCur->SetCellGroup(xPrevGrp);
sc::formula_block::iterator itGrpEnd = it;
+ if (xCurGrp->mnLength > std::distance(itGrpEnd, itEnd))
+ throw css::lang::IllegalArgumentException();
std::advance(itGrpEnd, xCurGrp->mnLength);
for (++it; it != itGrpEnd; ++it)
{