summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-01 08:55:23 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-08-03 18:32:20 +0200
commit26300f5d4c4e6241baf8cadcfea094e7969814a5 (patch)
tree6f5abdbe16aead6f08a640ef9db3ccef315df61e /sc
parentf207e283b756ea40721a46440d235836dcb79568 (diff)
forcepoint#55 invalid iterator increment
Change-Id: I151602f645a48404d93e0ae64a9e1d2a6ba2bc4b Reviewed-on: https://gerrit.libreoffice.org/58386 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-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 0ad5117d7d10..7b760b3daa48 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -3080,6 +3080,8 @@ public:
if (xCurGrp)
{
// Move to the cell after the last cell of the current group.
+ if (xCurGrp->mnLength > std::distance(it, itEnd))
+ throw css::lang::IllegalArgumentException();
std::advance(it, xCurGrp->mnLength);
nRow += xCurGrp->mnLength;
}