mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-12 10:45:13 +01:00
NULL-terminate context->attr_values so g_strfreev() is safe. Would
2002-01-28 Havoc Pennington <hp@pobox.com> * glib/gmarkup.c (add_attribute): NULL-terminate context->attr_values so g_strfreev() is safe. Would previously crash if parsing was ended prior to ending the start tag. (g_markup_parse_context_parse): add a couple assertions
This commit is contained in:
parent
b8e36f4539
commit
3370260a13
@ -1,3 +1,11 @@
|
||||
2002-01-28 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* glib/gmarkup.c (add_attribute): NULL-terminate
|
||||
context->attr_values so g_strfreev() is safe.
|
||||
Would previously crash if parsing was ended prior
|
||||
to ending the start tag.
|
||||
(g_markup_parse_context_parse): add a couple assertions
|
||||
|
||||
2002-01-28 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* glib/gmacros.h: get rid of warning here
|
||||
|
@ -1,3 +1,11 @@
|
||||
2002-01-28 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* glib/gmarkup.c (add_attribute): NULL-terminate
|
||||
context->attr_values so g_strfreev() is safe.
|
||||
Would previously crash if parsing was ended prior
|
||||
to ending the start tag.
|
||||
(g_markup_parse_context_parse): add a couple assertions
|
||||
|
||||
2002-01-28 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* glib/gmacros.h: get rid of warning here
|
||||
|
@ -1,3 +1,11 @@
|
||||
2002-01-28 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* glib/gmarkup.c (add_attribute): NULL-terminate
|
||||
context->attr_values so g_strfreev() is safe.
|
||||
Would previously crash if parsing was ended prior
|
||||
to ending the start tag.
|
||||
(g_markup_parse_context_parse): add a couple assertions
|
||||
|
||||
2002-01-28 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* glib/gmacros.h: get rid of warning here
|
||||
|
@ -1,3 +1,11 @@
|
||||
2002-01-28 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* glib/gmarkup.c (add_attribute): NULL-terminate
|
||||
context->attr_values so g_strfreev() is safe.
|
||||
Would previously crash if parsing was ended prior
|
||||
to ending the start tag.
|
||||
(g_markup_parse_context_parse): add a couple assertions
|
||||
|
||||
2002-01-28 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* glib/gmacros.h: get rid of warning here
|
||||
|
@ -1,3 +1,11 @@
|
||||
2002-01-28 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* glib/gmarkup.c (add_attribute): NULL-terminate
|
||||
context->attr_values so g_strfreev() is safe.
|
||||
Would previously crash if parsing was ended prior
|
||||
to ending the start tag.
|
||||
(g_markup_parse_context_parse): add a couple assertions
|
||||
|
||||
2002-01-28 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* glib/gmacros.h: get rid of warning here
|
||||
|
@ -1,3 +1,11 @@
|
||||
2002-01-28 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* glib/gmarkup.c (add_attribute): NULL-terminate
|
||||
context->attr_values so g_strfreev() is safe.
|
||||
Would previously crash if parsing was ended prior
|
||||
to ending the start tag.
|
||||
(g_markup_parse_context_parse): add a couple assertions
|
||||
|
||||
2002-01-28 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* glib/gmacros.h: get rid of warning here
|
||||
|
@ -1,3 +1,11 @@
|
||||
2002-01-28 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* glib/gmarkup.c (add_attribute): NULL-terminate
|
||||
context->attr_values so g_strfreev() is safe.
|
||||
Would previously crash if parsing was ended prior
|
||||
to ending the start tag.
|
||||
(g_markup_parse_context_parse): add a couple assertions
|
||||
|
||||
2002-01-28 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* glib/gmacros.h: get rid of warning here
|
||||
|
@ -1,3 +1,11 @@
|
||||
2002-01-28 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* glib/gmarkup.c (add_attribute): NULL-terminate
|
||||
context->attr_values so g_strfreev() is safe.
|
||||
Would previously crash if parsing was ended prior
|
||||
to ending the start tag.
|
||||
(g_markup_parse_context_parse): add a couple assertions
|
||||
|
||||
2002-01-28 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* glib/gmacros.h: get rid of warning here
|
||||
|
@ -732,6 +732,7 @@ add_attribute (GMarkupParseContext *context, char *name)
|
||||
context->attr_names[context->cur_attr] = name;
|
||||
context->attr_values[context->cur_attr] = NULL;
|
||||
context->attr_names[context->cur_attr+1] = NULL;
|
||||
context->attr_values[context->cur_attr+1] = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1196,7 +1197,11 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
g_free (context->attr_values[pos]);
|
||||
context->attr_names[pos] = context->attr_values[pos] = NULL;
|
||||
}
|
||||
context->cur_attr = -1;
|
||||
g_assert (context->cur_attr == -1);
|
||||
g_assert (context->attr_names == NULL ||
|
||||
context->attr_names[0] == NULL);
|
||||
g_assert (context->attr_values == NULL ||
|
||||
context->attr_values[0] == NULL);
|
||||
|
||||
if (tmp_error != NULL)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user