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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 23 10:39:41 UTC 2020


 sc/source/core/data/dociter.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 4cc8dfa2a20e9829d2d092f0cca14208f81a18cb
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Apr 23 09:19:32 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Apr 23 12:39:11 2020 +0200

    tdf#132278 crash after opening an old file
    
    regression from
        commit 7282014e362a1529a36c88eb308df8ed359c2cfa
        tdf#50916 Makes numbers of columns dynamic.
    
    Change-Id: I7a37631094b91f4859326db054f285daa8dccbb8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92740
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit 4faf8ef2553aba31d6021abce604f7716d2ad229)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92544
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 919c41c783e5..f501bb8da0d0 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -324,7 +324,8 @@ const sc::CellStoreType* ScDBQueryDataIterator::GetColumnCellStore(ScDocument& r
     ScTable* pTab = rDoc.FetchTable(nTab);
     if (!pTab)
         return nullptr;
-
+    if (nCol >= pTab->GetAllocatedColumnsCount())
+        return nullptr;
     return &pTab->aCol[nCol].maCells;
 }
 


More information about the Libreoffice-commits mailing list