mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-02 07:36:17 +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>
|
||||
|
||||
Bug 570501 - g_win32_get_system_data_dirs uses invalid conversion
|
||||
|
@ -1833,11 +1833,13 @@ _g_utf8_make_valid (const gchar *name)
|
||||
GString *string;
|
||||
const gchar *remainder, *invalid;
|
||||
gint remaining_bytes, valid_bytes;
|
||||
|
||||
|
||||
g_return_val_if_fail (name != NULL, NULL);
|
||||
|
||||
string = NULL;
|
||||
remainder = name;
|
||||
remaining_bytes = strlen (name);
|
||||
|
||||
|
||||
while (remaining_bytes != 0)
|
||||
{
|
||||
if (g_utf8_validate (remainder, remaining_bytes, &invalid))
|
||||
|
Loading…
Reference in New Issue
Block a user