summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Levin <avi.levin@samsung.com>2015-01-08 14:40:56 +0200
committerTom Hacohen <tom@stosb.com>2015-01-08 14:30:42 +0000
commitfb25bf332264d3f2d7b4c89692d321dec8bd9520 (patch)
tree3f7320802737860f4193a3a7bda8c762fb201a76
parent472d5914ff71b8b2f55731bb3103b6a86d123237 (diff)
eo: Fix bad addressing in _eo_classes array
The header.id was masked before using it as index in the _eo_classes array and was not unmasked when used. It hasn't caused segfault (by sheer luck) but was wrong. @fix
-rw-r--r--src/lib/eo/eo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 37dae75deb..ad0ea487f4 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -1446,7 +1446,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...)
1446 memset(tmp, 0, arrsize); 1446 memset(tmp, 0, arrsize);
1447 1447
1448 _eo_classes = tmp; 1448 _eo_classes = tmp;
1449 _eo_classes[klass->header.id - 1] = klass; 1449 _eo_classes[_UNMASK_ID(klass->header.id) - 1] = klass;
1450 } 1450 }
1451 eina_spinlock_release(&_eo_class_creation_lock); 1451 eina_spinlock_release(&_eo_class_creation_lock);
1452 1452