diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-01 08:55:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-08-01 15:04:25 +0200 |
commit | f40ec956b65ba25eacb75f201ea039639a5d1297 (patch) | |
tree | 1c00a4f19093a164aa525a282cc0838c8ac9fff9 | |
parent | 518210ad681bc0721c57c56e625abcb6429dd693 (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>
-rw-r--r-- | sc/source/core/data/column3.cxx | 2 |
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; } |