fix edje_cc segv when compiling bling bling theme

accessed parts out of range for the part table. check part count first
before checking. fixes segv. @fix

blinblng: http://enform.haxlab.org/files/blingbling_e21.tgz
This commit is contained in:
Carsten Haitzler 2016-10-15 11:28:01 +09:00
parent 3d6aae4633
commit 14aca77bfc
1 changed files with 5 additions and 2 deletions

View File

@ -644,8 +644,11 @@ check_program(Edje_Part_Collection *pc, Edje_Program *ep, Eet_File *ef)
EINA_LIST_FOREACH(ep->targets, l, et)
{
if (((ep->action == EDJE_ACTION_TYPE_STATE_SET) || (ep->action == EDJE_ACTION_TYPE_SIGNAL_EMIT)) &&
(pc->parts[et->id]->type == EDJE_PART_TYPE_MESH_NODE) && strstr(ep->signal, "mouse"))
if (((ep->action == EDJE_ACTION_TYPE_STATE_SET) ||
(ep->action == EDJE_ACTION_TYPE_SIGNAL_EMIT)) &&
(et->id < (int)pc->parts_count) &&
(pc->parts[et->id]->type == EDJE_PART_TYPE_MESH_NODE) &&
(strstr(ep->signal, "mouse")))
{
for (i = 0; (i < pc->parts_count) && (ep->source_3d_id < 0); i++)
{