diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2018-08-02 14:05:25 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2018-08-02 15:36:31 +0200 |
commit | 983b234bd566e98fb78ea1e19d4c874b4cb24c6e (patch) | |
tree | 745cece38dcc237631f681a17f748531226c16f6 | |
parent | 89f2d2449a3f7c31ddf14cad8812d44e530f0057 (diff) |
add invalid argument check to HandleIIOpCode()
This should have been part of 6b8be4b2aaca5.
Change-Id: I6f0263b014d0d7aa4622884922bca218c85ce29d
Reviewed-on: https://gerrit.libreoffice.org/58473
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 534c66491426..899871d42404 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -5839,6 +5839,9 @@ void ScCompiler::HandleIIOpCode(FormulaToken* token, FormulaToken*** pppToken, s // return true if opcode is handled bool ScCompiler::HandleIIOpCodeInternal(FormulaToken* token, FormulaToken*** pppToken, sal_uInt8 nNumParams) { + if (nNumParams > 0 && *pppToken[0] == nullptr) + return false; // Bad expression (see the dummy creation in FormulaCompiler::CompileTokenArray()) + const OpCode nOpCode = token->GetOpCode(); if (nOpCode == ocPush) |