raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=155126828010e8a1914050958866130422437cee

commit 155126828010e8a1914050958866130422437cee
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Wed Apr 1 20:43:54 2015 +0900

    efreetd - cache - fix handling a text index file with 0 length lines
    
    this fixes an efreetd cache crash where files like icon.exts might
    have lines with just a newline and no extension/content on the line.
    
    @fix
---
 src/bin/efreet/efreetd_cache.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/bin/efreet/efreetd_cache.c b/src/bin/efreet/efreetd_cache.c
index 0d58897..6c43749 100644
--- a/src/bin/efreet/efreetd_cache.c
+++ b/src/bin/efreet/efreetd_cache.c
@@ -411,9 +411,11 @@ fill_list(const char *file, Eina_List **l)
    if (!it) goto error;
    EINA_ITERATOR_FOREACH(it, line)
      {
-        const char *end;
-        end = line->end - 1;
-        *l = eina_list_append(*l, eina_stringshare_add_length(line->start, end 
- line->start));
+        if (line->end > line->start)
+          {
+             const char *end = line->end - 1;
+             *l = eina_list_append(*l, 
eina_stringshare_add_length(line->start, end - line->start));
+          }
      }
    eina_iterator_free(it);
 error:

-- 


Reply via email to