diff --git a/ChangeLog b/ChangeLog index bfe450700..b8a63e3a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-01-17 Matthias Clasen + + * glib/gconvert.c (g_get_filename_charsets): Don't crash + if G_FILENAME_ENCODING is empty. (#164330, Pawel Sakowski) + 2005-01-15 Tor Lillqvist * configure.in: sh portability fix. Use "test" and not [. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index bfe450700..b8a63e3a9 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2005-01-17 Matthias Clasen + + * glib/gconvert.c (g_get_filename_charsets): Don't crash + if G_FILENAME_ENCODING is empty. (#164330, Pawel Sakowski) + 2005-01-15 Tor Lillqvist * configure.in: sh portability fix. Use "test" and not [. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index bfe450700..b8a63e3a9 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2005-01-17 Matthias Clasen + + * glib/gconvert.c (g_get_filename_charsets): Don't crash + if G_FILENAME_ENCODING is empty. (#164330, Pawel Sakowski) + 2005-01-15 Tor Lillqvist * configure.in: sh portability fix. Use "test" and not [. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index bfe450700..b8a63e3a9 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2005-01-17 Matthias Clasen + + * glib/gconvert.c (g_get_filename_charsets): Don't crash + if G_FILENAME_ENCODING is empty. (#164330, Pawel Sakowski) + 2005-01-15 Tor Lillqvist * configure.in: sh portability fix. Use "test" and not [. diff --git a/glib/gconvert.c b/glib/gconvert.c index 2ebcfdf22..dc065606c 100644 --- a/glib/gconvert.c +++ b/glib/gconvert.c @@ -1070,7 +1070,7 @@ g_get_filename_charsets (G_CONST_RETURN gchar ***filename_charsets) cache->charset = g_strdup (charset); p = getenv ("G_FILENAME_ENCODING"); - if (p != NULL) + if (p != NULL && p[0] != '\0') { cache->filename_charsets = g_strsplit (p, ",", 0); cache->is_utf8 = (strcmp (cache->filename_charsets[0], "UTF-8") == 0);