summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-05-04 20:22:06 +0200
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-05-04 20:31:54 +0200
commited84d7d9007b297c00540f38bc07422a3be7267c (patch)
treee5beae97b51bb94712983479635620cab70df9e1
parent3861b35a3e0a6d7b787eb703b11ba720edc479d1 (diff)
downloadefl-devs/bu5hm4n/review.tar.gz
eo: fix missing event emissiondevs/bu5hm4n/review
There have been cases where the logic of _event_callback_call break'ed too early in the event submission. Reason for that was the line ((const unsigned char *) desc - (const unsigned char *) it->desc) producing a overflow. This means the if statement if (!legacy_compare && ((const unsigned char *) desc - (const unsigned char *) it->desc) < 0) was true while the pointer desc was smaller than it->desc, which means the event subscription got aborted, even if it should not. This turned out on two 32 bit maschines. And led to not rendering apps anymore. It was introduced by commit in 605fec91ee7. @fix
-rw-r--r--src/lib/eo/eo_base_class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 18c25bfc4d..6d05aed81d 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -1460,7 +1460,7 @@ restart_back:
{
// Array callbacks are sorted, break if we are getting to high.
if (!legacy_compare &&
- ((const unsigned char *) desc - (const unsigned char *) it->desc) < 0)
+ ((const unsigned char *) desc < (const unsigned char *) it->desc))
break;
if (!_cb_desc_match(it->desc, desc, legacy_compare))
continue;