diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-03-13 12:45:07 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-03-14 00:55:14 +0000 |
commit | 951fcc6556346e19a028443c70dea27d0cbc9c36 (patch) | |
tree | f4208391986fc845258c5821c425cb88241291d3 /sc | |
parent | 6376d23c51056284b55f486569433953ec36e7d2 (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>
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 1a0e433057bb..486aa51d72a1 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); |