[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-

From: Bastiaan Jacques
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-2128-g5e61379
Date: Tue, 10 Jun 2014 12:42:34 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  5e61379cc0dc50ea32ae0d848fab0b795a3819a7 (commit)
      from  2e5e5737faca9936e6a8645e69b380dddc52bf61 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------

commit 5e61379cc0dc50ea32ae0d848fab0b795a3819a7
Author: Bastiaan Jacques <address@hidden>
Date:   Tue Jun 10 14:41:17 2014 +0200

    Fix use-after-free.
    Don't forget to notify a cloned child XMLNode of its parent. This
    allows a child to notify a parent of its own destruction, and vice

diff --git a/libcore/asobj/XMLNode_as.cpp b/libcore/asobj/XMLNode_as.cpp
index cd1721f..e8155af 100644
--- a/libcore/asobj/XMLNode_as.cpp
+++ b/libcore/asobj/XMLNode_as.cpp
@@ -104,7 +104,9 @@ XMLNode_as::XMLNode_as(const XMLNode_as& tpl, bool deep)
     if (deep) {
         const Children& from=tpl._children;
         for (const auto& child : from) {
-            _children.push_back(new XMLNode_as(*child, deep));
+            XMLNode_as* copy = new XMLNode_as(*child, deep);
+            copy->setParent(this);
+            _children.push_back(copy);


Summary of changes:
 libcore/asobj/XMLNode_as.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]