File xfce4-xkb-plugin-0.5.3.3-do-not-free-stack-memory.patch of Package xfce4-panel-plugins

diff -ur xfce4-xkb-plugin-0.5.3.3.orig/panel-plugin/xkb-config.c xfce4-xkb-plugin-0.5.3.3/panel-plugin/xkb-config.c
--- xfce4-xkb-plugin-0.5.3.3.orig/panel-plugin/xkb-config.c	2011-01-01 01:14:16.000000000 +0100
+++ xfce4-xkb-plugin-0.5.3.3/panel-plugin/xkb-config.c	2011-01-01 01:18:16.000000000 +0100
@@ -290,7 +290,7 @@
         if (settings->kbd_config->toggle_option
                 && strlen (settings->kbd_config->toggle_option) > 0)
             options = g_strdup (settings->kbd_config->toggle_option);
-        else options = "";
+        else options = g_strdup ("");
 
         if (settings->kbd_config->compose_key_position
                 && strlen (settings->kbd_config->compose_key_position) > 0)
@@ -312,11 +312,11 @@
     {
         prefix = g_strsplit(*opt, ":", 2);
         if (settings->kbd_config->toggle_option == NULL
-                && prefix && strcmp(*prefix, "grp") == 0)
+                && prefix && *prefix && strcmp(*prefix, "grp") == 0)
         {
             settings->kbd_config->toggle_option = g_strdup (*opt);
         }
-        else if (prefix && strcmp(*prefix, "compose") == 0)
+        else if (prefix && *prefix && strcmp(*prefix, "compose") == 0)
         {
             settings->kbd_config->compose_key_position = g_strdup (*opt);
         }
openSUSE Build Service is sponsored by