[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sc/source

Caolán McNamara caolanm at redhat.com
Thu Apr 5 14:29:05 UTC 2018


 sc/source/core/data/column3.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit be9e229ee147d45f110ecc1680be4068c1716c02
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 26 12:50:20 2018 +0100

    forcepoint #31 check validity of another group range
    
    Change-Id: I82ff3e47a033c91581b108e1685b1ff4d5865895
    Reviewed-on: https://gerrit.libreoffice.org/51883
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index d3e3e24d88c5..2321e4e12907 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -3113,6 +3113,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;


More information about the Libreoffice-commits mailing list