formula/source/core/api/FormulaCompiler.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit cd816c0b4e698386a482f20c975281a0f3a7d332
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Aug 22 16:21:21 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Aug 22 21:23:50 2022 +0200

    cid#1509296 silence Use after free
    
    Change-Id: I6c1d8c0365cb59f3c63537c08e27a34bac111aaf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138705
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index 591b28744289..55e65ae9fd7c 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -2053,6 +2053,7 @@ void FormulaCompiler::IntersectionLine()
                 FormulaTokenRef pIntersect( new FormulaByteToken( 
ocIntersect));
                 // Replace ocSpaces with ocIntersect so that when switching
                 // formula syntax the correct operator string is created.
+                // coverity[freed_arg : FALSE] - FormulaTokenRef has a ref so 
ReplaceToken won't delete pIntersect
                 pArr->ReplaceToken( nCodeIndex, pIntersect.get(), 
FormulaTokenArray::ReplaceMode::CODE_ONLY);
                 PutCode( pIntersect);
             }

Reply via email to