raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=53d6486ffaec1e16dbad72d663a4f16ef3ca53f3
commit 53d6486ffaec1e16dbad72d663a4f16ef3ca53f3 Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com> Date: Thu Jul 13 18:48:31 2017 +0900 efreet icon cache create bin - check realloc results and handle @fix --- src/bin/efreet/efreet_icon_cache_create.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/bin/efreet/efreet_icon_cache_create.c b/src/bin/efreet/efreet_icon_cache_create.c index c8e732bf05..9cefc82dad 100644 --- a/src/bin/efreet/efreet_icon_cache_create.c +++ b/src/bin/efreet/efreet_icon_cache_create.c @@ -85,6 +85,7 @@ cache_fallback_scan_dir(Eina_Hash *icons, Eina_Hash *dirs, const char *dir) char *name; char *ext; unsigned int i; + void *p; if (entry->type == EINA_FILE_DIR) continue; @@ -114,7 +115,13 @@ cache_fallback_scan_dir(Eina_Hash *icons, Eina_Hash *dirs, const char *dir) if (i != icon->icons_count) continue; - icon->icons = realloc(icon->icons, sizeof (char *) * (icon->icons_count + 1)); + p = realloc(icon->icons, sizeof (char *) * (icon->icons_count + 1)); + if (!p) + { + ERR("Out of memory"); + exit(1); + } + icon->icons = p; icon->icons[icon->icons_count] = eina_stringshare_add(entry->path); eina_array_push(strs, icon->icons[icon->icons_count++]); } --