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

New commits:
commit 19b7f715543bdb55293f5d729fcefbcf2f701efe
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Tue Feb 22 19:03:53 2022 +0100
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Wed Feb 23 09:52:40 2022 +0100

    check valid col in ScTable::GetDataEntries()
    
    Presumably uncovered by 823eb92025853d120c17790d1c8efde59f033c69
    no longer allocating a column on GetPattern().
    
    Change-Id: I2f23414a912ec1a0f22b4b88ea367423fb6fb7e4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130388
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index f028a5fd795f..9f237804f4e8 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2993,6 +2993,8 @@ void ScTable::GetFilteredFilterEntries(
 
 bool ScTable::GetDataEntries(SCCOL nCol, SCROW nRow, std::set<ScTypedStrData>& 
rStrings)
 {
+    if (!ValidCol(nCol) || nCol >= GetAllocatedColumnsCount())
+        return false;
     return aCol[nCol].GetDataEntries( nRow, rStrings);
 }
 

Reply via email to