summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-04-12 14:39:45 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-05-01 10:39:01 -0700
commitaf9b5f2f8553b62d9bc7b212ca7f1246268e6620 (patch)
treedf08da2caf31a413fb6a0577d495d4881f787215 /src/lib
parent67d9c0c11e4c9860f7d977c240d1d50fcabdcf29 (diff)
ecore: efl_model_list_value_get will throw error when asked for out of range value.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore/ecore_internal.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/ecore/ecore_internal.h b/src/lib/ecore/ecore_internal.h
index c585f40aa4..8a54487aba 100644
--- a/src/lib/ecore/ecore_internal.h
+++ b/src/lib/ecore/ecore_internal.h
@@ -40,7 +40,10 @@ efl_model_list_value_get(Eina_List *childrens,
40 Eina_List *l; 40 Eina_List *l;
41 Eo *child; 41 Eo *child;
42 42
43 eina_value_array_setup(&v, EINA_VALUE_TYPE_OBJECT, eina_list_count(childrens)); 43 if (eina_list_count(childrens) < start + count)
44 return eina_value_error_init(EFL_MODEL_ERROR_INCORRECT_VALUE);
45
46 eina_value_array_setup(&v, EINA_VALUE_TYPE_OBJECT, 4);
44 47
45 childrens = eina_list_nth_list(childrens, start); 48 childrens = eina_list_nth_list(childrens, start);
46 49