mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 12:25:48 +01:00
sanity check the input paramter.
2009-02-23 Paolo Borelli <pborelli@katamail.com> * glib/gutf8.c (_g_utf8_make_valid): sanity check the input paramter. svn path=/trunk/; revision=7902
This commit is contained in:
parent
450b6fff14
commit
e1b7a25342
@ -1,3 +1,8 @@
|
|||||||
|
2009-02-23 Paolo Borelli <pborelli@katamail.com>
|
||||||
|
|
||||||
|
* glib/gutf8.c (_g_utf8_make_valid):
|
||||||
|
sanity check the input paramter.
|
||||||
|
|
||||||
2009-02-23 Tor Lillqvist <tml@novell.com>
|
2009-02-23 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
Bug 570501 - g_win32_get_system_data_dirs uses invalid conversion
|
Bug 570501 - g_win32_get_system_data_dirs uses invalid conversion
|
||||||
|
@ -1833,11 +1833,13 @@ _g_utf8_make_valid (const gchar *name)
|
|||||||
GString *string;
|
GString *string;
|
||||||
const gchar *remainder, *invalid;
|
const gchar *remainder, *invalid;
|
||||||
gint remaining_bytes, valid_bytes;
|
gint remaining_bytes, valid_bytes;
|
||||||
|
|
||||||
|
g_return_val_if_fail (name != NULL, NULL);
|
||||||
|
|
||||||
string = NULL;
|
string = NULL;
|
||||||
remainder = name;
|
remainder = name;
|
||||||
remaining_bytes = strlen (name);
|
remaining_bytes = strlen (name);
|
||||||
|
|
||||||
while (remaining_bytes != 0)
|
while (remaining_bytes != 0)
|
||||||
{
|
{
|
||||||
if (g_utf8_validate (remainder, remaining_bytes, &invalid))
|
if (g_utf8_validate (remainder, remaining_bytes, &invalid))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user