Merge branch 'wip/alice/bugfix' into 'main'

csstokenizer: Fix an out of bounds when reading an ident followed by EOF

See merge request GNOME/gtk!7169
This commit is contained in:
Matthias Clasen 2024-04-22 16:25:17 +00:00
commit f08e36e225

View File

@ -1020,7 +1020,7 @@ gtk_css_tokenizer_read_ident_like (GtkCssTokenizer *tokenizer,
{
gtk_css_tokenizer_read_name (tokenizer);
if (*tokenizer->data == '(')
if (gtk_css_tokenizer_remaining (tokenizer) > 0 && *tokenizer->data == '(')
{
gtk_css_tokenizer_consume_ascii (tokenizer);
if (g_ascii_strcasecmp (tokenizer->name_buffer->str, "url") == 0)