elementary: make sure we don't iterate out of bounds
authorJean Guyomarc'h <jean.guyomarch@openwide.fr>
Fri, 26 Aug 2016 13:00:52 +0000 (15:00 +0200)
committerJean Guyomarc'h <jean@guyomarch.bzh>
Fri, 26 Aug 2016 19:16:39 +0000 (21:16 +0200)
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.

src/lib/elementary/elc_fileselector.c

index 414bb85..81b6ba2 100644 (file)
@@ -859,6 +859,7 @@ _process_children_cb(void *data, void *values)
                   promises[3] = efl_model_property_get(child, "size");
                   promises[4] = efl_model_property_get(child, "mtime");
                   promises[5] = efl_model_property_get(child, "mime_type");
+                  promises[6] = NULL;
 
                   promise_all = eina_promise_all(eina_carray_iterator_new((void**)promises));
                   ++(lreq->item_total);