nodeparser: Fix SEGV in shadows parsing code
Testcase included The code was writing invalid memory, so this might not have always crashed, but I did my best to write the test so it causes a SEGV. Also included is a fix for the testsuite where the expected result was wrong.
This commit is contained in:
@@ -711,7 +711,7 @@ parse_shadows (GtkCssParser *parser,
|
||||
static void
|
||||
clear_shadows (gpointer inout_shadows)
|
||||
{
|
||||
g_array_set_size (*(GArray **) inout_shadows, 0);
|
||||
g_array_set_size (inout_shadows, 0);
|
||||
}
|
||||
|
||||
static const struct
|
||||
|
||||
@@ -7,3 +7,5 @@
|
||||
<data>:3:11-13: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
|
||||
<data>:3:13-14: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
<data>:3:13-14: error: GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE
|
||||
<data>:7:22-24: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
<data>:7:2-8:1: error: GTK_CSS_PARSER_WARNING_SYNTAX
|
||||
|
||||
@@ -2,3 +2,7 @@ shadow {
|
||||
shadows: 22;
|
||||
shadows: 22;
|
||||
}
|
||||
|
||||
shadow {
|
||||
shadows: blue 50 50 hi:
|
||||
}
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
shadow {
|
||||
shadows: rgb(0,0,0) 22 0, rgb(0,0,0) 22 0;
|
||||
shadows: rgb(0,0,0) 22 0;
|
||||
child: color {
|
||||
bounds: 0 0 50 50;
|
||||
color: rgb(255,0,204);
|
||||
}
|
||||
}
|
||||
shadow {
|
||||
shadows: rgb(0,0,0) 1 1;
|
||||
child: color {
|
||||
bounds: 0 0 50 50;
|
||||
color: rgb(255,0,204);
|
||||
|
||||
Reference in New Issue
Block a user