mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 23:16:14 +01:00
Remove leftover noinline attributes. (is_name_start_char, is_name_char):
2004-11-29 Matthias Clasen <mclasen@redhat.com> * glib/gmarkup.c: Remove leftover noinline attributes. (is_name_start_char, is_name_char): Avoid possible reads beyond the end of g_ascii_table.
This commit is contained in:
parent
75942393f5
commit
18651f45d0
@ -1,6 +1,8 @@
|
|||||||
2004-11-29 Matthias Clasen <mclasen@redhat.com>
|
2004-11-29 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/gmarkup.c: Remove leftover noinline attributes.
|
* glib/gmarkup.c: Remove leftover noinline attributes.
|
||||||
|
(is_name_start_char, is_name_char): Avoid possible reads
|
||||||
|
beyond the end of g_ascii_table.
|
||||||
|
|
||||||
* glib/Makefile.am: Use the perl found by configure. (#149826,
|
* glib/Makefile.am: Use the perl found by configure. (#149826,
|
||||||
Morten Welinder)
|
Morten Welinder)
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
2004-11-29 Matthias Clasen <mclasen@redhat.com>
|
2004-11-29 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/gmarkup.c: Remove leftover noinline attributes.
|
* glib/gmarkup.c: Remove leftover noinline attributes.
|
||||||
|
(is_name_start_char, is_name_char): Avoid possible reads
|
||||||
|
beyond the end of g_ascii_table.
|
||||||
|
|
||||||
* glib/Makefile.am: Use the perl found by configure. (#149826,
|
* glib/Makefile.am: Use the perl found by configure. (#149826,
|
||||||
Morten Welinder)
|
Morten Welinder)
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
2004-11-29 Matthias Clasen <mclasen@redhat.com>
|
2004-11-29 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/gmarkup.c: Remove leftover noinline attributes.
|
* glib/gmarkup.c: Remove leftover noinline attributes.
|
||||||
|
(is_name_start_char, is_name_char): Avoid possible reads
|
||||||
|
beyond the end of g_ascii_table.
|
||||||
|
|
||||||
* glib/Makefile.am: Use the perl found by configure. (#149826,
|
* glib/Makefile.am: Use the perl found by configure. (#149826,
|
||||||
Morten Welinder)
|
Morten Welinder)
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
2004-11-29 Matthias Clasen <mclasen@redhat.com>
|
2004-11-29 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/gmarkup.c: Remove leftover noinline attributes.
|
* glib/gmarkup.c: Remove leftover noinline attributes.
|
||||||
|
(is_name_start_char, is_name_char): Avoid possible reads
|
||||||
|
beyond the end of g_ascii_table.
|
||||||
|
|
||||||
* glib/Makefile.am: Use the perl found by configure. (#149826,
|
* glib/Makefile.am: Use the perl found by configure. (#149826,
|
||||||
Morten Welinder)
|
Morten Welinder)
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
2004-11-29 Matthias Clasen <mclasen@redhat.com>
|
2004-11-29 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/gmarkup.c: Remove leftover noinline attributes.
|
* glib/gmarkup.c: Remove leftover noinline attributes.
|
||||||
|
(is_name_start_char, is_name_char): Avoid possible reads
|
||||||
|
beyond the end of g_ascii_table.
|
||||||
|
|
||||||
* glib/Makefile.am: Use the perl found by configure. (#149826,
|
* glib/Makefile.am: Use the perl found by configure. (#149826,
|
||||||
Morten Welinder)
|
Morten Welinder)
|
||||||
|
@ -246,28 +246,28 @@ set_error (GMarkupParseContext *context,
|
|||||||
((c) == '=' || (c) == '/' || (c) == '>' || (c) == ' ')
|
((c) == '=' || (c) == '/' || (c) == '>' || (c) == ' ')
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
is_name_start_char (gunichar c)
|
is_name_start_char (const gchar *p)
|
||||||
{
|
{
|
||||||
if (g_ascii_isalpha (c) ||
|
if (g_ascii_isalpha (*p) ||
|
||||||
(!IS_COMMON_NAME_END_CHAR (c) &&
|
(!IS_COMMON_NAME_END_CHAR (*p) &&
|
||||||
(g_unichar_isalpha (c) ||
|
(*p == '_' ||
|
||||||
c == '_' ||
|
*p == ':' ||
|
||||||
c == ':')))
|
g_unichar_isalpha (g_utf8_get_char (p)))))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
is_name_char (gunichar c)
|
is_name_char (const gchar *p)
|
||||||
{
|
{
|
||||||
if (g_ascii_isalnum (c) ||
|
if (g_ascii_isalnum (*p) ||
|
||||||
(!IS_COMMON_NAME_END_CHAR (c) &&
|
(!IS_COMMON_NAME_END_CHAR (*p) &&
|
||||||
(g_unichar_isalnum (c) ||
|
(*p == '.' ||
|
||||||
c == '.' ||
|
*p == '-' ||
|
||||||
c == '-' ||
|
*p == '_' ||
|
||||||
c == '_' ||
|
*p == ':' ||
|
||||||
c == ':')))
|
g_unichar_isalpha (g_utf8_get_char (p)))))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -418,7 +418,7 @@ unescape_text_state_after_ampersand (UnescapeContext *ucontext,
|
|||||||
ucontext->entity_start = p;
|
ucontext->entity_start = p;
|
||||||
ucontext->state = USTATE_AFTER_CHARREF_HASH;
|
ucontext->state = USTATE_AFTER_CHARREF_HASH;
|
||||||
}
|
}
|
||||||
else if (!is_name_start_char (g_utf8_get_char (p)))
|
else if (!is_name_start_char (p))
|
||||||
{
|
{
|
||||||
if (*p == ';')
|
if (*p == ';')
|
||||||
{
|
{
|
||||||
@ -468,7 +468,7 @@ unescape_text_state_inside_entity_name (UnescapeContext *ucontext,
|
|||||||
{
|
{
|
||||||
if (*p == ';')
|
if (*p == ';')
|
||||||
break;
|
break;
|
||||||
else if (!is_name_char (*p))
|
else if (!is_name_char (p))
|
||||||
{
|
{
|
||||||
gchar ubuf[7];
|
gchar ubuf[7];
|
||||||
|
|
||||||
@ -785,7 +785,7 @@ advance_to_name_end (GMarkupParseContext *context)
|
|||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (!is_name_char (g_utf8_get_char (context->iter)))
|
if (!is_name_char (context->iter))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
while (advance_char (context));
|
while (advance_char (context));
|
||||||
@ -1090,7 +1090,7 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
|||||||
|
|
||||||
context->state = STATE_AFTER_CLOSE_TAG_SLASH;
|
context->state = STATE_AFTER_CLOSE_TAG_SLASH;
|
||||||
}
|
}
|
||||||
else if (is_name_start_char (g_utf8_get_char (context->iter)))
|
else if (is_name_start_char (context->iter))
|
||||||
{
|
{
|
||||||
context->state = STATE_INSIDE_OPEN_TAG_NAME;
|
context->state = STATE_INSIDE_OPEN_TAG_NAME;
|
||||||
|
|
||||||
@ -1283,7 +1283,7 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
|||||||
advance_char (context);
|
advance_char (context);
|
||||||
context->state = STATE_AFTER_CLOSE_ANGLE;
|
context->state = STATE_AFTER_CLOSE_ANGLE;
|
||||||
}
|
}
|
||||||
else if (is_name_start_char (g_utf8_get_char (context->iter)))
|
else if (is_name_start_char (context->iter))
|
||||||
{
|
{
|
||||||
context->state = STATE_INSIDE_ATTRIBUTE_NAME;
|
context->state = STATE_INSIDE_ATTRIBUTE_NAME;
|
||||||
/* start of attribute name */
|
/* start of attribute name */
|
||||||
@ -1514,7 +1514,7 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
|||||||
|
|
||||||
case STATE_AFTER_CLOSE_TAG_SLASH:
|
case STATE_AFTER_CLOSE_TAG_SLASH:
|
||||||
/* Possible next state: INSIDE_CLOSE_TAG_NAME */
|
/* Possible next state: INSIDE_CLOSE_TAG_NAME */
|
||||||
if (is_name_start_char (g_utf8_get_char (context->iter)))
|
if (is_name_start_char (context->iter))
|
||||||
{
|
{
|
||||||
context->state = STATE_INSIDE_CLOSE_TAG_NAME;
|
context->state = STATE_INSIDE_CLOSE_TAG_NAME;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user