raster pushed a commit to branch efl-1.8. http://git.enlightenment.org/core/efl.git/commit/?id=d757addd64d0e29232b417a3cf9686335eed621c
commit d757addd64d0e29232b417a3cf9686335eed621c Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com> Date: Wed Dec 4 20:22:26 2013 +0900 efreet - protect efreetd from recursing too far to save overhead and mem an errant path made its way into my efreet cache. this had a side-effect of causing efreetd to scan my entire $HOME recursively to monitor everything. while the original cause was $HOME getting in, we shouldn't have efreetd sit and consume scan all of $HOME when this is far from a normal situation. the recursive scanning is there ot handle some minimal levels of subdirs in app directories, but not an entire filesystem, so this mitigates the effects of errant cache data by limiting the amount of recursion allows for icon dirs and desktop dirs to 8 and 3 levels respectively. Conflicts: src/bin/efreet/efreetd_cache.c --- src/bin/efreet/efreetd_cache.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bin/efreet/efreetd_cache.c b/src/bin/efreet/efreetd_cache.c index 6ca556a..107f697 100644 --- a/src/bin/efreet/efreetd_cache.c +++ b/src/bin/efreet/efreetd_cache.c @@ -271,6 +271,8 @@ icon_changes_listen_recursive(Eina_Inarray *stack, const char *path, Eina_Bool b if ((st2->st_dev == st.st_dev) && (st2->st_ino == st.st_ino)) return; } + // protect against too deep recursion even if it's valid. + if (eina_inarray_count(stack) >= 8) return; eina_inarray_push(stack, &st); if ((!ecore_file_is_dir(path)) && (base)) @@ -321,7 +323,10 @@ desktop_changes_listen_recursive(Eina_Inarray *stack, const char *path, Eina_Boo if ((st2->st_dev == st.st_dev) && (st2->st_ino == st.st_ino)) return; } + // protect against too deep recursion even if it's valid. + if (eina_inarray_count(stack) >= 3) return; eina_inarray_push(stack, &st); + if ((!ecore_file_is_dir(path)) && (base)) { // XXX: if it doesn't exist... walk the parent dirs back down --