This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch AOO50X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO50X by this push:
     new 0070431fde comphelper: don't use the property helper after addProperty 
resets it
0070431fde is described below

commit 0070431fde067901a0a6ba9b5f98f3b4e11e2007
Author: Jim Jagielski <[email protected]>
AuthorDate: Sat Nov 7 05:29:18 2026 -0500

    comphelper: don't use the property helper after addProperty resets it
    
    impl_setPropertyValues_throw held a reference to it across addProperty.
    Loading a Base file from disk crashed a fresh office on Linux aarch64.
---
 main/comphelper/source/property/opropertybag.cxx | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/main/comphelper/source/property/opropertybag.cxx 
b/main/comphelper/source/property/opropertybag.cxx
index 995ae3fbff..dbb998f2fc 100644
--- a/main/comphelper/source/property/opropertybag.cxx
+++ b/main/comphelper/source/property/opropertybag.cxx
@@ -486,8 +486,6 @@ namespace comphelper
 
         try
         {
-            ::cppu::IPropertyArrayHelper& rPropInfo = getInfoHelper();
-
             // check for unknown properties
             // we cannot simply rely on the 
XMultiPropertySet::setPropertyValues
             // implementation of our base class, since it does not throw
@@ -504,7 +502,7 @@ namespace comphelper
                     ++pName, ++pHandle, ++pProperty
                 )
             {
-                *pHandle = rPropInfo.getHandleByName( *pName );
+                *pHandle = getInfoHelper().getHandleByName( *pName );
                 if ( *pHandle != -1 )
                     continue;
 
@@ -514,9 +512,7 @@ namespace comphelper
                     // add the property
                     sal_Int16 nAttributes = PropertyAttribute::BOUND | 
PropertyAttribute::REMOVEABLE | PropertyAttribute::MAYBEDEFAULT;
                     addProperty( *pName, nAttributes, pProperty->Value );
-                    // rPropInfo is invalid, refetch
-                    rPropInfo = getInfoHelper();
-                    *pHandle = rPropInfo.getHandleByName( *pName );
+                    *pHandle = getInfoHelper().getHandleByName( *pName );
                     continue;
                 }
 

Reply via email to