* edje: fix invalid memory access by edje alias code.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 8 Feb 2011 14:11:47 +0000 (14:11 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 8 Feb 2011 14:11:47 +0000 (14:11 +0000)
Reported by Jonathan Atton "Watchwolf".

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@56810 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
src/lib/edje_util.c

index eb53e11..096c34d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,3 +12,7 @@
 2011-02-01  Tom Hacohen (TAsn)
 
         * Added Mirroring support to edje objects.
+
+2011-02-08  Cedric BAIL
+
+       * Fix invalid memory access by edje alias code.
index 819085f..2cadbc8 100644 (file)
@@ -4514,8 +4514,14 @@ _edje_real_part_recursive_get_helper(const Edje *ed, char **path)
    const char *alias = NULL;
    char *idx = NULL;
 
+   if (!path[0])
+     return NULL;
+
    if (ed->collection && ed->collection->alias)
-     alias = eina_hash_find(ed->collection->alias, path[0]);
+     {
+        alias = eina_hash_find(ed->collection->alias, path[0]);
+        if (alias) alias = strdupa(alias);
+     }
 
    if (!alias)
      alias = path[0];