diff --git a/legacy/edje/ChangeLog b/legacy/edje/ChangeLog index eb53e116df..096c34d5a8 100644 --- a/legacy/edje/ChangeLog +++ b/legacy/edje/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. diff --git a/legacy/edje/src/lib/edje_util.c b/legacy/edje/src/lib/edje_util.c index 819085f1a5..2cadbc8e43 100644 --- a/legacy/edje/src/lib/edje_util.c +++ b/legacy/edje/src/lib/edje_util.c @@ -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];