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

Markus Mohrhard markus.mohrhard at googlemail.com
Tue Mar 14 00:55:49 UTC 2017


 sc/source/core/tool/interpr4.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 951fcc6556346e19a028443c70dea27d0cbc9c36
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Mar 13 12:45:07 2017 +0100

    tdf#106456, don't try to use invalid ranges in external ref code
    
    Change-Id: I38e622df87dd4b5e37dd248c5181978e13890fda
    Reviewed-on: https://gerrit.libreoffice.org/35132
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 1a0e433..486aa51 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -1317,6 +1317,12 @@ void ScInterpreter::GetExternalDoubleRef(
 
     ScComplexRefData aData(rData);
     ScRange aRange = aData.toAbs(aPos);
+    if (!ValidColRow(aRange.aStart.Col(), aRange.aStart.Row()) || !ValidColRow(aRange.aEnd.Col(), aRange.aEnd.Row()))
+    {
+        SetError(FormulaError::NoRef);
+        return;
+    }
+
     ScExternalRefCache::TokenArrayRef pArray = pRefMgr->getDoubleRefTokens(
         nFileId, rTabName, aRange, &aPos);
 


More information about the Libreoffice-commits mailing list