From 840cd6e44cc1abe1d72cf614d144166c792b6b3d Mon Sep 17 00:00:00 2001 From: Alice Mikhaylenko Date: Wed, 20 Mar 2024 21:36:52 +0400 Subject: [PATCH] csstokenizer: Fix an out of bounds when reading an ident followed by EOF --- gtk/css/gtkcsstokenizer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/css/gtkcsstokenizer.c b/gtk/css/gtkcsstokenizer.c index 24419ff58d..719358fd36 100644 --- a/gtk/css/gtkcsstokenizer.c +++ b/gtk/css/gtkcsstokenizer.c @@ -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)