diff --git a/xfce4-session-fix-gnome-mode.patch b/xfce4-session-fix-gnome-mode.patch index f499448..2fda5ef 100644 --- a/xfce4-session-fix-gnome-mode.patch +++ b/xfce4-session-fix-gnome-mode.patch @@ -1,6 +1,6 @@ diff -urNp xfce4-session-4.8.2.orig/settings/xfae-model.c xfce4-session-4.8.2/settings/xfae-model.c --- xfce4-session-4.8.2.orig/settings/xfae-model.c 2011-09-13 18:17:10.000000000 +0200 -+++ xfce4-session-4.8.2/settings/xfae-model.c 2011-10-08 17:37:29.000000000 +0200 ++++ xfce4-session-4.8.2/settings/xfae-model.c 2011-11-13 17:45:34.000000000 +0100 @@ -73,6 +73,7 @@ static gboolean xfae_model_ite static XfaeItem *xfae_item_new (const gchar *relpath); static void xfae_item_free (XfaeItem *item); @@ -34,32 +34,69 @@ diff -urNp xfce4-session-4.8.2.orig/settings/xfae-model.c xfce4-session-4.8.2/se gchar **not_show_in; gchar **args; gchar *icon_name; -@@ -457,18 +458,18 @@ xfae_item_new (const gchar *relpath) - } +@@ -454,37 +455,37 @@ xfae_item_new (const gchar *relpath) + item->comment = g_strdup (value); - /* check the OnlyShowIn setting */ + item->hidden = xfce_rc_read_bool_entry (rc, "Hidden", FALSE); +- } +- +- /* check the OnlyShowIn setting */ - only_show_in = xfce_rc_read_list_entry (rc, "OnlyShowIn", ";"); - if (G_UNLIKELY (only_show_in != NULL)) -+ item->only_show_in = xfce_rc_read_list_entry (rc, "OnlyShowIn", ";"); -+ if (G_UNLIKELY (item->only_show_in != NULL)) - { +- { - /* check if "Xfce" is specified */ - for (m = 0, skip = TRUE; only_show_in[m] != NULL; ++m) - if (g_ascii_strcasecmp (only_show_in[m], "Xfce") == 0) -+ /* check if "Xfce", "GNOME", or "KDE" are specified */ -+ for (m = 0, skip = TRUE; item->only_show_in[m] != NULL; ++m) -+ if ((g_ascii_strcasecmp (item->only_show_in[m], "Xfce") == 0) || -+ (g_ascii_strcasecmp (item->only_show_in[m], "GNOME") == 0) || -+ (g_ascii_strcasecmp (item->only_show_in[m], "KDE") == 0)) - { - skip = FALSE; - break; - } -- +- { +- skip = FALSE; +- break; +- } + - g_strfreev (only_show_in); +- } +- else +- { +- /* check the NotShowIn setting */ +- not_show_in = xfce_rc_read_list_entry (rc, "NotShowIn", ";"); +- if (G_UNLIKELY (not_show_in != NULL)) ++ /* check the OnlyShowIn setting */ ++ item->only_show_in = xfce_rc_read_list_entry (rc, "OnlyShowIn", ";"); ++ if (G_UNLIKELY (item->only_show_in != NULL)) + { +- /* check if "Xfce" is not specified */ +- for (m = 0; not_show_in[m] != NULL; ++m) +- if (g_ascii_strcasecmp (not_show_in[m], "Xfce") == 0) ++ /* check if "Xfce", "GNOME", or "KDE" are specified */ ++ for (m = 0, skip = TRUE; item->only_show_in[m] != NULL; ++m) ++ if ((g_ascii_strcasecmp (item->only_show_in[m], "Xfce") == 0) || ++ (g_ascii_strcasecmp (item->only_show_in[m], "GNOME") == 0) || ++ (g_ascii_strcasecmp (item->only_show_in[m], "KDE") == 0)) + { +- skip = TRUE; ++ skip = FALSE; + break; + } ++ } ++ else ++ { ++ /* check the NotShowIn setting */ ++ not_show_in = xfce_rc_read_list_entry (rc, "NotShowIn", ";"); ++ if (G_UNLIKELY (not_show_in != NULL)) ++ { ++ /* check if "Xfce" is not specified */ ++ for (m = 0; not_show_in[m] != NULL; ++m) ++ if (g_ascii_strcasecmp (not_show_in[m], "Xfce") == 0) ++ { ++ skip = TRUE; ++ break; ++ } + +- g_strfreev (not_show_in); ++ g_strfreev (not_show_in); ++ } + } } - else - { + @@ -515,6 +516,7 @@ xfae_item_free (XfaeItem *item) g_free (item->relpath); g_free (item->comment); @@ -132,7 +169,7 @@ diff -urNp xfce4-session-4.8.2.orig/settings/xfae-model.c xfce4-session-4.8.2/se /* tell the view that we have most probably a new state */ diff -urNp xfce4-session-4.8.2.orig/xfce4-session/xfsm-compat-gnome.c xfce4-session-4.8.2/xfce4-session/xfsm-compat-gnome.c --- xfce4-session-4.8.2.orig/xfce4-session/xfsm-compat-gnome.c 2011-09-13 18:17:17.000000000 +0200 -+++ xfce4-session-4.8.2/xfce4-session/xfsm-compat-gnome.c 2011-10-07 17:14:02.000000000 +0200 ++++ xfce4-session-4.8.2/xfce4-session/xfsm-compat-gnome.c 2011-11-13 17:32:37.000000000 +0100 @@ -294,7 +294,9 @@ xfsm_compat_gnome_startup (XfsmSplashScr if (G_UNLIKELY (gnome_compat_started)) return; @@ -161,7 +198,7 @@ diff -urNp xfce4-session-4.8.2.orig/xfce4-session/xfsm-compat-gnome.c xfce4-sess } diff -urNp xfce4-session-4.8.2.orig/xfce4-session/xfsm-startup.c xfce4-session-4.8.2/xfce4-session/xfsm-startup.c --- xfce4-session-4.8.2.orig/xfce4-session/xfsm-startup.c 2011-09-13 18:17:17.000000000 +0200 -+++ xfce4-session-4.8.2/xfce4-session/xfsm-startup.c 2011-10-07 17:14:02.000000000 +0200 ++++ xfce4-session-4.8.2/xfce4-session/xfsm-startup.c 2011-11-13 17:32:37.000000000 +0100 @@ -352,9 +352,7 @@ xfsm_startup_autostart_xdg (XfsmManager * then "KDE" is specified. */ for (m = 0, skip = TRUE; only_show_in[m] != NULL; ++m) diff --git a/xfce4-session.changes b/xfce4-session.changes index b1916fb..85e037a 100644 --- a/xfce4-session.changes +++ b/xfce4-session.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Nov 13 17:33:24 UTC 2011 - gber@opensuse.org + +- fixed xfce4-session-fix-gnome-mode.patch to prevent NULL pointer + dereference on invalid autostart files + ------------------------------------------------------------------- Fri Oct 21 11:47:24 UTC 2011 - gber@opensuse.org