From: liiulinsong Date: Fri, 26 May 2023 02:18:58 +0000 (+0800) Subject: Make sure that the charcode is signless X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~42 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ed8331efcdc2abd65f8c362017547b4d0dbabe83;p=gtk%2B3.0.git Make sure that the charcode is signless 1. The data with type of char is signed by default. 2. The byte value of UTF-8 is signless by default. 3. So, if a UTF-8 charcode is stored in a char array, we should cast the type of its value from char to unsigned char. Origin: 3.24.39, commit:6dc75b46cc9afe1c98b7ba72a9b1a275c723ea42 Gbp-Pq: Name Make-sure-that-the-charcode-is-signless.patch --- diff --git a/gtk/gtkcssparser.c b/gtk/gtkcssparser.c index 44ff7bcfca..fc8ede28b8 100644 --- a/gtk/gtkcssparser.c +++ b/gtk/gtkcssparser.c @@ -373,7 +373,7 @@ _gtk_css_parser_read_char (GtkCssParser *parser, parser->data++; return TRUE; } - if (*parser->data >= 127) + if ((*(guchar *) parser->data) >= 127) { gsize len = g_utf8_skip[(guint) *(guchar *) parser->data];