summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-03-13 12:45:07 +0100
committerEike Rathke <erack@redhat.com>2017-04-06 14:17:16 +0000
commit057889ab6daa159558f5a90bc03d987500d65b04 (patch)
treec8801ca14723b3b7b3df2599d9e797a83545cc51
parent2d9de590d9ebd8740fc0f6d94f5ee98b22377877 (diff)
tdf#106456, don't try to use invalid ranges in external ref code
Reviewed-on: https://gerrit.libreoffice.org/35132 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 951fcc6556346e19a028443c70dea27d0cbc9c36) Backported. Change-Id: I38e622df87dd4b5e37dd248c5181978e13890fda Reviewed-on: https://gerrit.libreoffice.org/35188 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r--sc/source/core/tool/interpr4.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index fe3469c8f403..e76b45e097e6 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -1307,6 +1307,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(errNoRef);
+ return;
+ }
+
ScExternalRefCache::TokenArrayRef pArray = pRefMgr->getDoubleRefTokens(
nFileId, rTabName, aRange, &aPos);