diff options
author | Brian Cameron <brian.cameron@sun.com> | 2007-04-02 05:21:36 +0000 |
---|---|---|
committer | Brian Cameron <bcameron@src.gnome.org> | 2007-04-02 05:21:36 +0000 |
commit | 6deadd802f1bec2d1ebc7ec0dc0861fdf049f781 (patch) | |
tree | e91eb87931beb13eb77dd331a5ee29e2c14c683b /gui | |
parent | 9173aa02b40121314002505b2aa7c4d2419f2738 (diff) | |
download | gdm-6deadd802f1bec2d1ebc7ec0dc0861fdf049f781.tar.gz |
Fix strcpy so source and destination do not overlap. Fixes bug #424299.
2006-04-02 Brian Cameron <brian.cameron@sun.com>
* gui/gdmlanguages.c: Fix strcpy so source and destination do not
overlap. Fixes bug #424299. Patch by Ray Strode
<rstrode@redhat.com>.
svn path=/trunk/; revision=4739
Diffstat (limited to 'gui')
-rw-r--r-- | gui/gdmlanguages.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gui/gdmlanguages.c b/gui/gdmlanguages.c index c97f18e5..d0d444a5 100644 --- a/gui/gdmlanguages.c +++ b/gui/gdmlanguages.c @@ -462,7 +462,9 @@ gdm_lang_name (const char *language, if (no_group) { char *p = strchr (name, '|'); if (p != NULL) { - strcpy (name, p+1); + p = g_strdup (p + 1); + g_free (name); + name = p; } } |