cedric pushed a commit to branch master.

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

commit eb8511ce7bc68615fcc837031e66336cbc18dcdd
Author: Cedric BAIL <cedric.b...@free.fr>
Date:   Thu Apr 18 09:42:37 2019 -0700

    ecore: protect efl_model_properties_get from accesing NULL pointer when 
Model parent is not a Efl.BooleanModel.
    
    Reviewed-by: Marcel Hollerbach <m...@marcel-hollerbach.de>
    Differential Revision: https://phab.enlightenment.org/D8659
---
 src/lib/ecore/efl_boolean_model.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore/efl_boolean_model.c 
b/src/lib/ecore/efl_boolean_model.c
index 20aed0fe50..03e0cee346 100644
--- a/src/lib/ecore/efl_boolean_model.c
+++ b/src/lib/ecore/efl_boolean_model.c
@@ -32,9 +32,13 @@ static Eina_Iterator *
 _efl_boolean_model_efl_model_properties_get(const Eo *obj,
                                             Efl_Boolean_Model_Data *pd)
 {
+   Eina_Iterator *properties = NULL;
+
+   if (pd->parent)
+     properties = eina_hash_iterator_key_new(pd->parent->values);
    EFL_COMPOSITE_MODEL_PROPERTIES_SUPER(props,
                                         obj, EFL_BOOLEAN_MODEL_CLASS,
-                                        
eina_hash_iterator_key_new(pd->parent->values));
+                                        properties);
    return props;
 }
 

-- 


Reply via email to