bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e8e637a79a6cfb2bfec53e9afccde1f216220571

commit e8e637a79a6cfb2bfec53e9afccde1f216220571
Author: Alastair Poole <nets...@gmail.com>
Date:   Fri Jun 7 19:34:19 2019 +0000

    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)

-- 


Reply via email to