[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[E-devel] [patch] segfault when scanning application directory
Hi,
Today my neat E17 wouldn't start anymore. Turned out that it tried to scan a
nonexistent directory (~/.e/applications/all/openoffice) for applications for
some reason, and then crash in line 2201 of e_apps.c. It doesn't check if a2
is NULL, though the result of e_app_new() can be NULL.
Regards,
Reinier
Index: apps/e/src/bin/e_apps.c
===================================================================
RCS file: /var/cvs/e/e17/apps/e/src/bin/e_apps.c,v
retrieving revision 1.129
diff -u -3 -p -r1.129 e_apps.c
--- apps/e/src/bin/e_apps.c 7 Apr 2006 12:27:20 -0000 1.129
+++ apps/e/src/bin/e_apps.c 12 Apr 2006 18:35:33 -0000
@@ -2198,8 +2198,11 @@ _e_app_cache_new(E_App_Cache *ac, const
if ((ac2->is_dir) && (scan_subdirs))
{
a2 = e_app_new(buf, scan_subdirs);
- a2->parent = a;
- a->subapps = evas_list_append(a->subapps, a2);
+ if (a2)
+ {
+ a2->parent = a;
+ a->subapps = evas_list_append(a->subapps, a2);
+ }
}
else
{