summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-04-01 20:43:54 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-04-01 20:44:57 +0900
commit155126828010e8a1914050958866130422437cee (patch)
tree16c948b3e277bc7f2f0c0c7fbd044e9c82160ac7 /src/bin
parent7271c99b3c06cccf9fe1b3b61071559be58caf71 (diff)
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
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/efreet/efreetd_cache.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bin/efreet/efreetd_cache.c b/src/bin/efreet/efreetd_cache.c
index 0d588970c7..6c43749dea 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)
411 if (!it) goto error; 411 if (!it) goto error;
412 EINA_ITERATOR_FOREACH(it, line) 412 EINA_ITERATOR_FOREACH(it, line)
413 { 413 {
414 const char *end; 414 if (line->end > line->start)
415 end = line->end - 1; 415 {
416 *l = eina_list_append(*l, eina_stringshare_add_length(line->start, end - line->start)); 416 const char *end = line->end - 1;
417 *l = eina_list_append(*l, eina_stringshare_add_length(line->start, end - line->start));
418 }
417 } 419 }
418 eina_iterator_free(it); 420 eina_iterator_free(it);
419error: 421error: