diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-03-13 12:45:07 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-03-16 14:43:57 +0100 |
commit | 6db24ee070bbf0b4290ad31d313e0a32ee7e35b5 (patch) | |
tree | e35c832d2c8eb16f02742d3338a28c5a7ee0553c /sc | |
parent | d371f3f0428925a06cf7954dfc29bea9e916ff13 (diff) |
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@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit 951fcc6556346e19a028443c70dea27d0cbc9c36)
Reviewed-on: https://gerrit.libreoffice.org/35180
Reviewed-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 20bcaeb0f8509e4b12d72d4612b5f3c9bfde3489)
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index f26649187be5..7a0b08b06c96 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); |