gdm/gdm-2.18.0-dont-strcpy-overlapping-strings.patch

14 lines
357 B
Diff

--- gdm-2.18.0/gui/gdmlanguages.c.dont-strcpy-overlapping-strings 2007-03-29 15:03:42.000000000 -0400
+++ gdm-2.18.0/gui/gdmlanguages.c 2007-03-29 15:05:07.000000000 -0400
@@ -445,7 +445,9 @@
if (no_group) {
char *p = strchr (name, '|');
if (p != NULL) {
- strcpy (name, p+1);
+ p = g_strdup (p + 1);
+ g_free (name);
+ name = p;
}
}