From: Enlightenment S. <no-...@en...> - 2011-02-08 14:11:54
|
Log: * edje: fix invalid memory access by edje alias code. Reported by Jonathan Atton "Watchwolf". Author: cedric Date: 2011-02-08 06:11:47 -0800 (Tue, 08 Feb 2011) New Revision: 56810 Trac: http://trac.enlightenment.org/e/changeset/56810 Modified: trunk/edje/ChangeLog trunk/edje/src/lib/edje_util.c Modified: trunk/edje/ChangeLog =================================================================== --- trunk/edje/ChangeLog 2011-02-08 13:47:41 UTC (rev 56809) +++ trunk/edje/ChangeLog 2011-02-08 14:11:47 UTC (rev 56810) @@ -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. Modified: trunk/edje/src/lib/edje_util.c =================================================================== --- trunk/edje/src/lib/edje_util.c 2011-02-08 13:47:41 UTC (rev 56809) +++ trunk/edje/src/lib/edje_util.c 2011-02-08 14:11:47 UTC (rev 56810) @@ -4514,8 +4514,14 @@ 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]; |