diff options
author | Jean Guyomarc'h <jean.guyomarch@openwide.fr> | 2016-08-26 15:00:52 +0200 |
---|---|---|
committer | Jean Guyomarc'h <jean@guyomarch.bzh> | 2016-08-26 21:16:39 +0200 |
commit | 322adb2e035fec05de109568934a013afe0b9edb (patch) | |
tree | 902a367255bbfafdfbd41e598135694f2a97a9b7 | |
parent | 5db3357f4029ad88b14ceb7b125d981e23889ec8 (diff) |
elementary: make sure we don't iterate out of bounds
The carray iterator will end iterating only when it finds a NULL
object. We must make sure the last element of the array is NULL
to avoid out of bounds access.
-rw-r--r-- | src/lib/elementary/elc_fileselector.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/elementary/elc_fileselector.c b/src/lib/elementary/elc_fileselector.c index 414bb85c25..81b6ba211c 100644 --- a/src/lib/elementary/elc_fileselector.c +++ b/src/lib/elementary/elc_fileselector.c | |||
@@ -859,6 +859,7 @@ _process_children_cb(void *data, void *values) | |||
859 | promises[3] = efl_model_property_get(child, "size"); | 859 | promises[3] = efl_model_property_get(child, "size"); |
860 | promises[4] = efl_model_property_get(child, "mtime"); | 860 | promises[4] = efl_model_property_get(child, "mtime"); |
861 | promises[5] = efl_model_property_get(child, "mime_type"); | 861 | promises[5] = efl_model_property_get(child, "mime_type"); |
862 | promises[6] = NULL; | ||
862 | 863 | ||
863 | promise_all = eina_promise_all(eina_carray_iterator_new((void**)promises)); | 864 | promise_all = eina_promise_all(eina_carray_iterator_new((void**)promises)); |
864 | ++(lreq->item_total); | 865 | ++(lreq->item_total); |