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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new 5fa6457249 unoxml: fix double free in CNode::appendChild when libxml2 
merges a text node
5fa6457249 is described below

commit 5fa645724935a9615af828516cbb0e5d1d9ee0db
Author: Jim Jagielski <[email protected]>
AuthorDate: Thu Oct 29 05:54:14 2026 -0400

    unoxml: fix double free in CNode::appendChild when libxml2 merges a text 
node
---
 main/unoxml/source/dom/node.cxx | 1 +
 1 file changed, 1 insertion(+)

diff --git a/main/unoxml/source/dom/node.cxx b/main/unoxml/source/dom/node.cxx
index d187a26d52..c5794ffd21 100644
--- a/main/unoxml/source/dom/node.cxx
+++ b/main/unoxml/source/dom/node.cxx
@@ -356,6 +356,7 @@ namespace DOM
             // if res != cur, something was optimized and the newchild-wrapper
             // should be updated
             if (res && (cur != res)) {
+                pNewChild->m_bUnlinked = false; // else invalidate() frees cur 
again
                 pNewChild->invalidate(); // cur has been freed
             }
         }

Reply via email to