summaryrefslogtreecommitdiff
path: root/sc/source/core/data/column3.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-01 08:55:23 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-08-01 15:04:25 +0200
commitf40ec956b65ba25eacb75f201ea039639a5d1297 (patch)
tree1c00a4f19093a164aa525a282cc0838c8ac9fff9 /sc/source/core/data/column3.cxx
parent518210ad681bc0721c57c56e625abcb6429dd693 (diff)
forcepoint#55 invalid iterator increment
Change-Id: I151602f645a48404d93e0ae64a9e1d2a6ba2bc4b Reviewed-on: https://gerrit.libreoffice.org/58384 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/core/data/column3.cxx')
-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 b8b5acd28a3c..9a1a5622a608 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -3081,6 +3081,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;
}