mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 11:20:12 +00:00
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.
This commit is contained in:
parent
f7f9e16939
commit
794593a4f8
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user