summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsc/qa/unit/data/xls/fail/forcepoint-group-range-1.xlsbin0 -> 163886 bytes
-rw-r--r--sc/source/core/data/column3.cxx2
2 files changed, 2 insertions, 0 deletions
diff --git a/sc/qa/unit/data/xls/fail/forcepoint-group-range-1.xls b/sc/qa/unit/data/xls/fail/forcepoint-group-range-1.xls
new file mode 100755
index 000000000000..1aca9c7f113e
--- /dev/null
+++ b/sc/qa/unit/data/xls/fail/forcepoint-group-range-1.xls
Binary files differ
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)
{