diff options
-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 3774086251de..b3a01a4737f3 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -3120,6 +3120,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; |