summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-26 12:50:20 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-04-05 16:18:15 +0200
commit0213fc80c7bf8022fc2781c5a230d169eaa2c885 (patch)
tree17acdf34bf0452d773cc294f4e39bb88a34e03c4
parent713a85d9a315b4fa84e1c5704bcb9c4f7457d113 (diff)
forcepoint #31 check validity of another group range
Change-Id: I82ff3e47a033c91581b108e1685b1ff4d5865895 Reviewed-on: https://gerrit.libreoffice.org/51882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-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 a50856290c35..855f82c39423 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -3115,6 +3115,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;