[clutter/clutter-1.14] cally-root: Prevent memory corruption



commit 360a629f8d1cd90c3233305c44f67de88f54eaf7
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Feb 7 15:54:02 2013 -0500

    cally-root: Prevent memory corruption
    
    accessible->name is eventually freed, so we need to dup the string
    to ensure that everything is alright.

 clutter/cally/cally-root.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/clutter/cally/cally-root.c b/clutter/cally/cally-root.c
index 04a7992..3b9ff87 100644
--- a/clutter/cally/cally-root.c
+++ b/clutter/cally/cally-root.c
@@ -167,7 +167,7 @@ cally_root_initialize (AtkObject              *accessible,
   CallyRoot           *root          = NULL;
 
   accessible->role = ATK_ROLE_APPLICATION;
-  accessible->name = g_get_prgname();
+  accessible->name = g_strdup (g_get_prgname());
   accessible->accessible_parent = NULL;
 
   /* children initialization */


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