diff options
author | Benjamin Otte <otte@redhat.com> | 2014-07-30 18:23:20 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2014-07-31 10:03:18 +0200 |
commit | 5f5d3a9d820004e88b43ff20884d604b4620e47e (patch) | |
tree | 9aec2eed1041c371785e72b7d1a1790a03e510b5 /gtk | |
parent | 83c9fe109ea705fc6beabb561658aa08432ae0cf (diff) | |
download | gtk+-5f5d3a9d820004e88b43ff20884d604b4620e47e.tar.gz |
css: Don't infloop when parsing broken borders
There was an infinite loop when parsing invalid text after having parsed
a color in the border shorthand. See attached testcase for an example.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkcssshorthandpropertyimpl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk/gtkcssshorthandpropertyimpl.c b/gtk/gtkcssshorthandpropertyimpl.c index 06c20ddcd4..c81e2c4703 100644 --- a/gtk/gtkcssshorthandpropertyimpl.c +++ b/gtk/gtkcssshorthandpropertyimpl.c @@ -353,6 +353,13 @@ parse_border_side (GtkCssShorthandProperty *shorthand, if (values[2] == NULL) return FALSE; } + else + { + /* We parsed and there's still stuff left? + * Pretend we didn't notice and let the normal code produce + * a 'junk at end of value' error */ + break; + } } while (!value_is_done_parsing (parser)); |