aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormallum <mallum@b067294f-1dea-0310-9683-c47a78595994>2005-09-26 08:18:43 +0000
committermallum <mallum@b067294f-1dea-0310-9683-c47a78595994>2005-09-26 08:18:43 +0000
commit11d8038e54ab5291e0c2548989f8ae30093ff0af (patch)
tree7bd8353408bf50240a09cfae69a18f9d9e15c9bb
parent167ff616f05aa37de9492e412fad1af989b71f7e (diff)
downloadmatchbox-panel-11d8038e54ab5291e0c2548989f8ae30093ff0af.tar.gz
matchbox-panel-11d8038e54ab5291e0c2548989f8ae30093ff0af.tar.bz2
matchbox-panel-11d8038e54ab5291e0c2548989f8ae30093ff0af.zip
Fix potential segv on parsing corrupt .directory files.
git-svn-id: https://svn.o-hand.com/repos/matchbox/trunk/matchbox-panel@1205 b067294f-1dea-0310-9683-c47a78595994
-rw-r--r--ChangeLog5
-rw-r--r--applets/mb-applet-menu-launcher.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5973483..7af1d60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-09-26 mallum,,, <mallum@openedhand.com>
+
+ * applets/mb-applet-menu-launcher.c: (build_menu):
+ Fix potential segv on parsing corrupt .directory files.
+
2005-09-15 mallum <mallum@openedhand.com>
* applets/Makefile.am:
diff --git a/applets/mb-applet-menu-launcher.c b/applets/mb-applet-menu-launcher.c
index 45dd483..0c7b211 100644
--- a/applets/mb-applet-menu-launcher.c
+++ b/applets/mb-applet-menu-launcher.c
@@ -438,6 +438,11 @@ build_menu(void)
mb_dot_desktop_folders_enumerate(ddfolders, ddentry)
{
char *icon_path = NULL;
+ char *folder_name = NULL;
+
+ /* Check Name is valid for entry */
+ if ((folder_name = mb_dot_desktop_folder_entry_get_name(ddentry)) == NULL)
+ continue;
if (mb_dot_desktop_folder_entry_get_icon(ddentry))
icon_path = mb_dot_desktop_icon_get_full_path (app_data->theme_name,
@@ -445,7 +450,7 @@ build_menu(void)
mb_dot_desktop_folder_entry_get_icon(ddentry) );
menu_lookup[i].item = mb_menu_add_path(app_data->mbmenu,
- mb_dot_desktop_folder_entry_get_name(ddentry),
+ folder_name,
icon_path, MBMENU_NO_SORT );
menu_lookup[i].match_str = mb_dot_desktop_folder_entry_get_match(ddentry);