Warn and don't crash when meeting a trailing \\. (#301373, Benjamin Otte)

2005-04-28  Matthias Clasen  <mclasen@redhat.com>

	* glib/gstrfuncs.c (g_strcompress): Warn and don't crash
	when meeting a trailing \\.  (#301373, Benjamin Otte)
This commit is contained in:
Matthias Clasen 2005-04-28 20:47:51 +00:00 committed by Matthias Clasen
parent dc11b4370f
commit 09b1a23fef
5 changed files with 24 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-04-28 Matthias Clasen <mclasen@redhat.com>
* glib/gstrfuncs.c (g_strcompress): Warn and don't crash
when meeting a trailing \\. (#301373, Benjamin Otte)
2005-04-27 Tor Lillqvist <tml@novell.com>
* glib/gconvert.c (open_converter, g_convert_with_iconv): Don't

View File

@ -1,3 +1,8 @@
2005-04-28 Matthias Clasen <mclasen@redhat.com>
* glib/gstrfuncs.c (g_strcompress): Warn and don't crash
when meeting a trailing \\. (#301373, Benjamin Otte)
2005-04-27 Tor Lillqvist <tml@novell.com>
* glib/gconvert.c (open_converter, g_convert_with_iconv): Don't

View File

@ -1,3 +1,8 @@
2005-04-28 Matthias Clasen <mclasen@redhat.com>
* glib/gstrfuncs.c (g_strcompress): Warn and don't crash
when meeting a trailing \\. (#301373, Benjamin Otte)
2005-04-27 Tor Lillqvist <tml@novell.com>
* glib/gconvert.c (open_converter, g_convert_with_iconv): Don't

View File

@ -1,3 +1,8 @@
2005-04-28 Matthias Clasen <mclasen@redhat.com>
* glib/gstrfuncs.c (g_strcompress): Warn and don't crash
when meeting a trailing \\. (#301373, Benjamin Otte)
2005-04-27 Tor Lillqvist <tml@novell.com>
* glib/gconvert.c (open_converter, g_convert_with_iconv): Don't

View File

@ -1966,6 +1966,9 @@ g_strcompress (const gchar *source)
p++;
switch (*p)
{
case '\0':
g_warning ("g_strcompress: trailing \\");
goto out;
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7':
*q = 0;
@ -2002,6 +2005,7 @@ g_strcompress (const gchar *source)
*q++ = *p;
p++;
}
out:
*q = 0;
return dest;