diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2011-03-07 22:42:33 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2011-03-07 23:06:54 +0100 |
commit | 794593a4f8208c8c52363e4bdf7103f5f215a9fc (patch) | |
tree | 164435256f765aa3d201f5697ad5a9cfd0ad33de /gtk | |
parent | f7f9e16939112b3c06444c92c833625ecd2d8028 (diff) | |
download | gtk+-794593a4f8208c8c52363e4bdf7103f5f215a9fc.tar.gz |
cssprovider: return immediately if there's remaining data behind a parsed value
parse_value() could fill in a GError, but yet (incorrectly) return G_TOKEN_NONE,
having the GError leaked as a result.
https://bugzilla.gnome.org/show_bug.cgi?id=642604 , Reported by Felix Riemann.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkcssprovider.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index a0be44ab9f..be6fbd783a 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -3087,12 +3087,16 @@ css_provider_parse_value (GtkCssProvider *css_provider, parsed = FALSE; } + if (end) + SKIP_SPACES (end); + if (end && *end) { /* Set error position in the scanner * according to what we've parsed so far */ priv->value_pos += (end - value_str); + parsed = FALSE; if (error && !*error) g_set_error_literal (error, |