diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-04-02 14:28:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-04-02 17:46:26 +0200 |
commit | 8de38977838d5a044271cb170730e3d557659f17 (patch) | |
tree | 06da971468f1da6b5c9d305bd8442306266930cd /sc | |
parent | a3c5c0f7ce73001adab7475fde1f8ffec4eef48b (diff) |
ofz: Segv on unknown address
Change-Id: I6c69375a89781fc0b87230203335c861efb562f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113518
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 250e816a2e5e..faf5d587de42 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -2638,7 +2638,14 @@ Label_MaskStateMachine: if (eState != ssSkipReference) { *pSym++ = c; - *pSym++ = *pSrc++; + + if( pSym == &cSymbol[ MAXSTRLEN ] ) + { + SetError( FormulaError::StringOverflow); + eState = ssStop; + } + else + *pSym++ = *pSrc++; } bAddToSymbol = false; } |