summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2020-04-13 19:50:43 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2020-04-13 19:50:43 +0900
commitaee7d74b156ad65305a62e06c2cc1fcc45c7d84a (patch)
tree3a2d60a9e48b4efdc8b12a9028f63ad9419f2750
parentd43515d9dcc51df92838db929417d6715a5720bf (diff)
eo: null check for vtable allocation
Reviewers: bu5hm4n, Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11687
-rw-r--r--src/lib/eo/eo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 4d3469c428..b93497372c 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -906,6 +906,7 @@ efl_class_functions_set(const Efl_Class *klass_id, const Efl_Object_Ops *object_
906 klass->class_id = _UNMASK_ID(klass->header.id) - 1; 906 klass->class_id = _UNMASK_ID(klass->header.id) - 1;
907 907
908 _vtable_init(&klass->vtable); 908 _vtable_init(&klass->vtable);
909 if (!klass->vtable.chain) goto err_vtable;
909 910
910 hitmap = alloca(klass->vtable.size); 911 hitmap = alloca(klass->vtable.size);
911 memset(hitmap, 0, klass->vtable.size); 912 memset(hitmap, 0, klass->vtable.size);
@@ -980,6 +981,9 @@ err_funcs:
980err_klass: 981err_klass:
981 _EO_POINTER_ERR(klass_id, "Class (%p) is an invalid ref.", klass_id); 982 _EO_POINTER_ERR(klass_id, "Class (%p) is an invalid ref.", klass_id);
982 return EINA_FALSE; 983 return EINA_FALSE;
984err_vtable:
985 ERR("failed to allocate vtable for class '%s'", klass->desc->name);
986 return EINA_FALSE;
983} 987}
984 988
985static Eo * 989static Eo *