summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-08 17:05:59 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-09 09:51:04 +0100
commitcd0b749cc4b4f268d26639fb3c6cbf2128b2d7df (patch)
tree7e909aef1f19a8d9c1eb28c7bf89352c453ee04c /sc
parent78aa5db6999b8e8881f65ec10518110296840ff2 (diff)
ofz: bad mnRangeOpPosInSymbol
Change-Id: Ieae5a81a1b475fd56cce76c43dab11c2d9fcbe6c Reviewed-on: https://gerrit.libreoffice.org/44498 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/compiler.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 7bad98fe742e..68d1f3148135 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2670,6 +2670,8 @@ Label_MaskStateMachine:
{
SetError( FormulaError::StringOverflow );
nLen = MAXSTRLEN-1;
+ if (mnRangeOpPosInSymbol > nLen)
+ mnRangeOpPosInSymbol = -1;
}
lcl_UnicodeStrNCpy( cSymbol, aSymbol.getStr(), nLen );
pSym = &cSymbol[nLen];