mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-04 10:16:17 +01:00
Handle a long stream of bytes containing no UTF-8 character starts
2000-11-11 Havoc Pennington <hp@pobox.com> * gmarkup.c (g_markup_parse_context_parse): Handle a long stream of bytes containing no UTF-8 character starts
This commit is contained in:
parent
ccc9329e1c
commit
96b9935a7c
@ -1,3 +1,8 @@
|
||||
2000-11-11 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gmarkup.c (g_markup_parse_context_parse): Handle a long stream
|
||||
of bytes containing no UTF-8 character starts
|
||||
|
||||
2000-11-11 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib.def: Add missing entry points.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2000-11-11 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gmarkup.c (g_markup_parse_context_parse): Handle a long stream
|
||||
of bytes containing no UTF-8 character starts
|
||||
|
||||
2000-11-11 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib.def: Add missing entry points.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2000-11-11 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gmarkup.c (g_markup_parse_context_parse): Handle a long stream
|
||||
of bytes containing no UTF-8 character starts
|
||||
|
||||
2000-11-11 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib.def: Add missing entry points.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2000-11-11 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gmarkup.c (g_markup_parse_context_parse): Handle a long stream
|
||||
of bytes containing no UTF-8 character starts
|
||||
|
||||
2000-11-11 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib.def: Add missing entry points.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2000-11-11 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gmarkup.c (g_markup_parse_context_parse): Handle a long stream
|
||||
of bytes containing no UTF-8 character starts
|
||||
|
||||
2000-11-11 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib.def: Add missing entry points.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2000-11-11 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gmarkup.c (g_markup_parse_context_parse): Handle a long stream
|
||||
of bytes containing no UTF-8 character starts
|
||||
|
||||
2000-11-11 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib.def: Add missing entry points.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2000-11-11 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gmarkup.c (g_markup_parse_context_parse): Handle a long stream
|
||||
of bytes containing no UTF-8 character starts
|
||||
|
||||
2000-11-11 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib.def: Add missing entry points.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2000-11-11 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gmarkup.c (g_markup_parse_context_parse): Handle a long stream
|
||||
of bytes containing no UTF-8 character starts
|
||||
|
||||
2000-11-11 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib.def: Add missing entry points.
|
||||
|
@ -889,6 +889,17 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
g_string_append_len (context->leftover_char_portion,
|
||||
text, text_len);
|
||||
|
||||
if (context->leftover_char_portion->len > 7)
|
||||
{
|
||||
/* The leftover char portion is too big to be
|
||||
* a UTF-8 character
|
||||
*/
|
||||
set_error (context,
|
||||
error,
|
||||
G_MARKUP_ERROR_BAD_UTF8,
|
||||
_("Invalid UTF-8 encoded text"));
|
||||
}
|
||||
|
||||
goto finished;
|
||||
}
|
||||
}
|
||||
|
11
gmarkup.c
11
gmarkup.c
@ -889,6 +889,17 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
g_string_append_len (context->leftover_char_portion,
|
||||
text, text_len);
|
||||
|
||||
if (context->leftover_char_portion->len > 7)
|
||||
{
|
||||
/* The leftover char portion is too big to be
|
||||
* a UTF-8 character
|
||||
*/
|
||||
set_error (context,
|
||||
error,
|
||||
G_MARKUP_ERROR_BAD_UTF8,
|
||||
_("Invalid UTF-8 encoded text"));
|
||||
}
|
||||
|
||||
goto finished;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user