elementary: only parse mail file and prevent segv.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 19 Apr 2011 16:59:23 +0000 (16:59 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 19 Apr 2011 16:59:23 +0000 (16:59 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@58733 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_store.c

index dd760e6..8807e90 100644 (file)
@@ -153,6 +153,7 @@ _store_genlist_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
              sti->data = NULL;
           }
         LKD(sti->lock);
+       st->items = NULL;
         free(sti);
      }
    // 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);
-   return strdup(s);
+   return s ? strdup(s) : NULL;
 }
 
 static Evas_Object *
@@ -403,6 +404,8 @@ _store_filesystem_list_do(void *data, Ecore_Thread *th __UNUSED__)
         Eina_Bool ok;
         size_t pathsz = finf->path_length + 1;
 
+       if (finf->path[finf->name_start] == '.') continue ;
+
         info = calloc(1, sizeof(Elm_Store_Item_Info_Filesystem) + pathsz);
         if (!info) continue;
         info->path = ((char *)info) + sizeof(Elm_Store_Item_Info_Filesystem);