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
This commit is contained in:
parent
7271c99b3c
commit
1551268280
|
@ -411,9 +411,11 @@ fill_list(const char *file, Eina_List **l)
|
||||||
if (!it) goto error;
|
if (!it) goto error;
|
||||||
EINA_ITERATOR_FOREACH(it, line)
|
EINA_ITERATOR_FOREACH(it, line)
|
||||||
{
|
{
|
||||||
const char *end;
|
if (line->end > line->start)
|
||||||
end = line->end - 1;
|
{
|
||||||
*l = eina_list_append(*l, eina_stringshare_add_length(line->start, 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);
|
eina_iterator_free(it);
|
||||||
error:
|
error:
|
||||||
|
|
Loading…
Reference in New Issue