Line 0
Link Here
|
|
|
1 |
Fix g_strerror() on non-glibc |
2 |
|
3 |
When using one of the codepaths that copies the error string into buf, |
4 |
make sure the string gets strdup() afterward. |
5 |
|
6 |
https://bugzilla.gnome.org/show_bug.cgi?id=758194 |
7 |
|
8 |
Also see https://git.gnome.org/browse/glib/commit/glib/gstrfuncs.c?id=f87e002313d566dcce71a9aba040d22ddb5c1e80 |
9 |
|
10 |
--- glib/gstrfuncs.c.orig 2015-11-06 18:12:04 UTC |
11 |
+++ glib/gstrfuncs.c |
12 |
@@ -1293,6 +1293,8 @@ g_strerror (gint errnum) |
13 |
if (error) |
14 |
g_print ("%s\n", error->message); |
15 |
} |
16 |
+ else if (msg == (const gchar *)buf) |
17 |
+ msg = g_strdup(buf); |
18 |
|
19 |
g_hash_table_insert (errors, GINT_TO_POINTER (errnum), (char *) msg); |
20 |
} |