From c403be3bb730555de4d553cdeca00dc10a33f700 Mon Sep 17 00:00:00 2001 From: Leandro Dorileo Date: Thu, 3 Jan 2013 18:17:42 +0000 Subject: [PATCH] Edje: invalidate double named group What happens if a group has 2 name statements("double named")? edje will fail to free the groups cache while shuting down due the collection directory entry hash having two entries with different names but pointing to the same object - the second try to free the part mem pool will fail - since it was freed before - and issue an abort. SVN revision: 82093 --- legacy/edje/src/bin/edje_cc_handlers.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/legacy/edje/src/bin/edje_cc_handlers.c b/legacy/edje/src/bin/edje_cc_handlers.c index 80a5063f1e..54bb41ef5c 100644 --- a/legacy/edje/src/bin/edje_cc_handlers.c +++ b/legacy/edje/src/bin/edje_cc_handlers.c @@ -2464,6 +2464,9 @@ st_collections_group_name(void) current_pc = eina_list_data_get(eina_list_last(edje_collections)); + if (current_de->entry) + goto double_named_group; + current_de->entry = parse_str(0); current_pc->part = current_de->entry; @@ -2486,6 +2489,10 @@ st_collections_group_name(void) break; } +double_named_group: + ERR("Invalid group, only a single name statement is valid for group, use " + "alias instead."); + exit(-1); } typedef struct _Edje_List_Foreach_Data Edje_List_Foreach_Data;