mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-17 11:11:58 +02:00
Bug 555314 – mem leak in gmarkup
svn path=/trunk/; revision=7579
This commit is contained in:
parent
c7501c8223
commit
c973369e31
@ -1,3 +1,9 @@
|
|||||||
|
2008-10-08 Christian Persch <chpe@gnome.org>
|
||||||
|
|
||||||
|
Bug 555314 – mem leak in gmarkup
|
||||||
|
|
||||||
|
* glib/gmarkup.c: (g_markup_parse_context_parse): Plug a mem leak.
|
||||||
|
|
||||||
2008-10-08 Tor Lillqvist <tml@novell.com>
|
2008-10-08 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
Bug 554790 - g_convert() misbehaves with winiconv versions
|
Bug 554790 - g_convert() misbehaves with winiconv versions
|
||||||
|
@ -1096,6 +1096,8 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
|||||||
{
|
{
|
||||||
gint newlines = 0;
|
gint newlines = 0;
|
||||||
const gchar *p, *q;
|
const gchar *p, *q;
|
||||||
|
gchar *current_text_dup;
|
||||||
|
|
||||||
q = p = context->current_text;
|
q = p = context->current_text;
|
||||||
while (p != first_invalid)
|
while (p != first_invalid)
|
||||||
{
|
{
|
||||||
@ -1111,12 +1113,13 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
|||||||
context->line_number += newlines;
|
context->line_number += newlines;
|
||||||
context->char_number += g_utf8_strlen (q, first_invalid - q);
|
context->char_number += g_utf8_strlen (q, first_invalid - q);
|
||||||
|
|
||||||
|
current_text_dup = g_strndup (context->current_text, context->current_text_len);
|
||||||
set_error (context,
|
set_error (context,
|
||||||
error,
|
error,
|
||||||
G_MARKUP_ERROR_BAD_UTF8,
|
G_MARKUP_ERROR_BAD_UTF8,
|
||||||
_("Invalid UTF-8 encoded text - not valid '%s'"),
|
_("Invalid UTF-8 encoded text - not valid '%s'"),
|
||||||
g_strndup (context->current_text,
|
current_text_dup);
|
||||||
context->current_text_len));
|
g_free (current_text_dup);
|
||||||
goto finished;
|
goto finished;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user