[Libreoffice-commits] core.git: sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Aug 1 13:04:50 UTC 2018


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

New commits:
commit f40ec956b65ba25eacb75f201ea039639a5d1297
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Aug 1 08:55:23 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Aug 1 15:04:25 2018 +0200

    forcepoint#55 invalid iterator increment
    
    Change-Id: I151602f645a48404d93e0ae64a9e1d2a6ba2bc4b
    Reviewed-on: https://gerrit.libreoffice.org/58384
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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;
                 }


More information about the Libreoffice-commits mailing list