diff options
author | Brian Cameron <brian.cameron@sun.com> | 2008-07-31 12:59:09 +0000 |
---|---|---|
committer | Brian Cameron <bcameron@src.gnome.org> | 2008-07-31 12:59:09 +0000 |
commit | e65e697b5d9170b93b12eb0f8ee5d0efff7a177a (patch) | |
tree | 9ff153b109249e5bb39e5607fcd8b8eec73641d7 /gui | |
parent | 185ed0933f4b6a7774e33138715b106204cc73e4 (diff) | |
download | gdm-e65e697b5d9170b93b12eb0f8ee5d0efff7a177a.tar.gz |
use g_strdup when copying strings to avoid a crash. Reported by Matthias
2008-07-31 Brian Cameron <brian.cameron@sun.com>
* gui/gdmchooser.c: use g_strdup when copying strings to avoid
a crash. Reported by Matthias Drochner <M.Drochner@fz-juelich.de>
in bug #544730 with a proposed patch, which I modified slightly.
svn path=/branches/gnome-2-20/; revision=6343
Diffstat (limited to 'gui')
-rw-r--r-- | gui/gdmchooser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/gdmchooser.c b/gui/gdmchooser.c index 70fbb0a3..95d15062 100644 --- a/gui/gdmchooser.c +++ b/gui/gdmchooser.c @@ -1998,7 +1998,7 @@ main (int argc, char *argv[]) if (gdm_config_get_bool (GDM_KEY_BROADCAST)) { gchar *tmp; if (ve_string_empty (GdmHosts)) { - tmp = "BROADCAST"; + tmp = g_strdup ("BROADCAST"); } else { tmp = g_strconcat (GdmHosts, ",BROADCAST", NULL); } @@ -2010,7 +2010,7 @@ main (int argc, char *argv[]) if (gdm_config_get_bool (GDM_KEY_MULTICAST)) { gchar *tmp; if (ve_string_empty (GdmHosts)) { - tmp = "MULTICAST"; + tmp = g_strdup ("MULTICAST"); } else { tmp = g_strconcat (GdmHosts, ",MULTICAST", NULL); } |