diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2018-10-12 19:57:17 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2018-11-13 13:21:48 +0100 |
commit | 374c88d97429721414841f556b5885f497491b82 (patch) | |
tree | dbe4a40084efc63278b0a69b9a291d1f722b4e04 /sc/source | |
parent | 0638d2502cb59e31b021fe35dbba7d1f2bec8e92 (diff) |
do not crash in opencl code with malformed formula
Change-Id: Ie749b57eb0041059ad91a6ec66eddb631168cd56
Reviewed-on: https://gerrit.libreoffice.org/63180
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/opencl/formulagroupcl.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index 9cc9df1724e0..a0c7a098c579 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -3600,6 +3600,8 @@ DynamicKernel* DynamicKernel::create( const ScCalcConfig& rConfig, const ScToken sal_uInt8 nParamCount = pCur->GetParamCount(); for (sal_uInt8 i = 0; i < nParamCount; i++) { + if( aTokenVector.empty()) + return nullptr; FormulaToken* pTempFormula = aTokenVector.back(); aTokenVector.pop_back(); if (pTempFormula->GetOpCode() != ocPush) |