From: cedric Date: Tue, 8 Feb 2011 14:11:47 +0000 (+0000) Subject: * edje: fix invalid memory access by edje alias code. X-Git-Tag: 2.0_alpha~163^2~127 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=127aefedff43b395415cd63e61377d554b259769;p=framework%2Fuifw%2Fedje.git * edje: fix invalid memory access by edje alias code. Reported by Jonathan Atton "Watchwolf". git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@56810 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/ChangeLog b/ChangeLog index eb53e11..096c34d 100644 --- 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. diff --git a/src/lib/edje_util.c b/src/lib/edje_util.c index 819085f..2cadbc8 100644 --- a/src/lib/edje_util.c +++ b/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];