elementary: only parse mail file and prevent segv.

SVN revision: 58733
This commit is contained in:
Cedric BAIL 2011-04-19 16:59:23 +00:00
parent b4dd37cceb
commit 213f07730d
1 changed files with 4 additions and 1 deletions

View File

@ -153,6 +153,7 @@ _store_genlist_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
sti->data = NULL; sti->data = NULL;
} }
LKD(sti->lock); LKD(sti->lock);
st->items = NULL;
free(sti); free(sti);
} }
// FIXME: kill threads and more // FIXME: kill threads and more
@ -308,7 +309,7 @@ _store_item_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part)
} }
} }
LKU(sti->lock); LKU(sti->lock);
return strdup(s); return s ? strdup(s) : NULL;
} }
static Evas_Object * static Evas_Object *
@ -403,6 +404,8 @@ _store_filesystem_list_do(void *data, Ecore_Thread *th __UNUSED__)
Eina_Bool ok; Eina_Bool ok;
size_t pathsz = finf->path_length + 1; size_t pathsz = finf->path_length + 1;
if (finf->path[finf->name_start] == '.') continue ;
info = calloc(1, sizeof(Elm_Store_Item_Info_Filesystem) + pathsz); info = calloc(1, sizeof(Elm_Store_Item_Info_Filesystem) + pathsz);
if (!info) continue; if (!info) continue;
info->path = ((char *)info) + sizeof(Elm_Store_Item_Info_Filesystem); info->path = ((char *)info) + sizeof(Elm_Store_Item_Info_Filesystem);