From c3b8b3943755265f4680b063124752a3f59907cb Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 23 Jul 2015 11:21:05 +0200 Subject: [PATCH] An empty is invalid. --- components/style/custom_properties.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/style/custom_properties.rs b/components/style/custom_properties.rs index 63c4d15afa3..0992feac2d8 100644 --- a/components/style/custom_properties.rs +++ b/components/style/custom_properties.rs @@ -34,6 +34,10 @@ pub fn parse(input: &mut Parser) -> Result { /// https://drafts.csswg.org/css-syntax-3/#typedef-declaration-value fn parse_declaration_value(input: &mut Parser, references: &mut HashSet) -> Result<(), ()> { + if input.is_exhausted() { + // Need at least one token + return Err(()) + } while let Ok(token) = input.next() { match token { Token::BadUrl |