summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-11-18 10:00:11 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-11-18 14:35:17 +0100
commitc2cb3af28a415c2e68b8fe18465522636cb7f774 (patch)
tree4d36ec3484dac939d3890f8918fc663217ee0f46 /sc
parent58ee73068fa881950e42cca22ed17cf5829b8d14 (diff)
cid#1448537 silence Wrapper object use after free
Change-Id: I896556485c441c9d0e79e75f41d0eb452f0eb21f Reviewed-on: https://gerrit.libreoffice.org/83069 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins 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 ac0390d4ee56..d750f377d1ad 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -4739,6 +4739,7 @@ std::unique_ptr<ScTokenArray> ScCompiler::CompileString( const OUString& rFormul
// remember pArr, in case a subsequent CompileTokenArray() is executed.
std::unique_ptr<ScTokenArray> pNew(new ScTokenArray( aArr ));
pNew->GenHash();
+ // coverity[escape : FALSE] - ownership of pNew is retained by caller, so pArr remains valid
pArr = pNew.get();
maArrIterator = FormulaTokenArrayPlainIterator(*pArr);
@@ -4770,6 +4771,7 @@ std::unique_ptr<ScTokenArray> ScCompiler::CompileString( const OUString& rFormul
{
// remember pArr, in case a subsequent CompileTokenArray() is executed.
std::unique_ptr<ScTokenArray> pNew(new ScTokenArray( aTokenArray ));
+ // coverity[escape : FALSE] - ownership of pNew is retained by caller, so pArr remains valid
pArr = pNew.get();
maArrIterator = FormulaTokenArrayPlainIterator(*pArr);
return pNew;