diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-06-09 13:14:57 +0200 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-06-09 13:21:45 +0200 |
commit | 2ae6055d808efd365a4beb8690525f3715fd82d3 (patch) | |
tree | c03aa5626674eed263dc5a4436ae32398e031077 | |
parent | e8e637a79a6cfb2bfec53e9afccde1f216220571 (diff) | |
download | efl-2ae6055d808efd365a4beb8690525f3715fd82d3.tar.gz |
edje_cc: protect array lookup
it seems with those two actions here in the commit, do use id in a
different way the other actions do. This is commit protects against
this.
Differential Revision: https://phab.enlightenment.org/D9078
-rw-r--r-- | src/bin/edje/edje_cc_out.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c index 592b592736..2b5f700e3e 100644 --- a/src/bin/edje/edje_cc_out.c +++ b/src/bin/edje/edje_cc_out.c @@ -734,6 +734,14 @@ check_program(Edje_Part_Collection *pc, Edje_Program *ep, Eet_File *ef) { Edje_Part *part; + /* + * we are accessing part with an id, + * if actions is ACTION_STOP or ACTION_TYPE_SCRIPT, then id is from the parts array. + * In order to not crash here, we should continue here. + */ + if (ep->action != EDJE_ACTION_TYPE_ACTION_STOP || ep->action != EDJE_ACTION_TYPE_SCRIPT) + continue; + if (et->id >= (int) pc->parts_count) { ERR("Target id '%d' greater than possible index '%d'.", et->id, (int) pc->parts_count - 1); |