diff options
-rw-r--r-- | src/parse/properties.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/parse/properties.c b/src/parse/properties.c index b6ace4a..f7979ef 100644 --- a/src/parse/properties.c +++ b/src/parse/properties.c @@ -3448,6 +3448,10 @@ css_error parse_line_height(css_language *c, if (consumed != token->ilower->len) return CSS_INVALID; + /* Negative values are illegal */ + if (length < 0) + return CSS_INVALID; + parserutils_vector_iterate(vector, ctx); value = LINE_HEIGHT_NUMBER; } else { @@ -3459,6 +3463,10 @@ css_error parse_line_height(css_language *c, if (unit & UNIT_ANGLE || unit & UNIT_TIME || unit & UNIT_FREQ) return CSS_INVALID; + /* Negative values are illegal */ + if (length < 0) + return CSS_INVALID; + value = LINE_HEIGHT_DIMENSION; } |