From e8e637a79a6cfb2bfec53e9afccde1f216220571 Mon Sep 17 00:00:00 2001 From: Alastair Poole Date: Fri, 7 Jun 2019 19:34:19 +0000 Subject: [PATCH] edje_cc_out: Exit instead of segfault on OpenBSD. Until the cause of these issues can be found exit and print error messages to console. edje_cc is currently not reliable on OpenBSD. Until then anyone wanting to use EFL on this platform will need pre-compiled .edj files. Differential Revision: https://phab.enlightenment.org/D9077 --- src/bin/edje/edje_cc_out.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c index 8a3bcfb3e5..592b592736 100644 --- a/src/bin/edje/edje_cc_out.c +++ b/src/bin/edje/edje_cc_out.c @@ -734,6 +734,12 @@ check_program(Edje_Part_Collection *pc, Edje_Program *ep, Eet_File *ef) { Edje_Part *part; + if (et->id >= (int) pc->parts_count) + { + ERR("Target id '%d' greater than possible index '%d'.", et->id, (int) pc->parts_count - 1); + exit(-1); + } + part = pc->parts[et->id]; /* verify existence of description in part */ if (ep->action == EDJE_ACTION_TYPE_STATE_SET)