diff options
author | Benjamin Otte <otte@redhat.com> | 2014-07-30 18:45:15 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2014-07-31 10:03:19 +0200 |
commit | d6e9997619fb6bfe082360f1702d6d29250dc3ce (patch) | |
tree | 4e9ffd12a1bc3c9725d29e3f05fadc37fc26939e /gtk/gtkcssshorthandpropertyimpl.c | |
parent | 5f5d3a9d820004e88b43ff20884d604b4620e47e (diff) | |
download | gtk+-d6e9997619fb6bfe082360f1702d6d29250dc3ce.tar.gz |
css: Fail animation shorthand parsing properly
When a number is not a nubmer, don't just crash, exit properly with an
error code.
See attached testcase for an example.
Diffstat (limited to 'gtk/gtkcssshorthandpropertyimpl.c')
-rw-r--r-- | gtk/gtkcssshorthandpropertyimpl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkcssshorthandpropertyimpl.c b/gtk/gtkcssshorthandpropertyimpl.c index c81e2c4703..647787880c 100644 --- a/gtk/gtkcssshorthandpropertyimpl.c +++ b/gtk/gtkcssshorthandpropertyimpl.c @@ -722,6 +722,9 @@ parse_one_animation (GtkCssShorthandProperty *shorthand, GTK_CSS_POSITIVE_ONLY | (values[1] == NULL ? GTK_CSS_PARSE_NUMBER : 0) | (values[3] == NULL ? GTK_CSS_PARSE_TIME : 0)); + if (value == NULL) + return FALSE; + if (_gtk_css_number_value_get_unit (value) == GTK_CSS_NUMBER) values[1] = value; else if (values[2] == NULL) |