diff options
Diffstat (limited to 'src/parse')
-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 4297307..38fc58b 100644 --- a/src/parse/properties.c +++ b/src/parse/properties.c @@ -6215,6 +6215,10 @@ css_error parse_volume(css_language *c, if (consumed != token->ilower->len) return CSS_INVALID; + /* Must be between 0 and 100 */ + if (length < 0 || length > F_100) + return CSS_INVALID; + parserutils_vector_iterate(vector, ctx); value = VOLUME_NUMBER; } else { @@ -6227,6 +6231,10 @@ css_error parse_volume(css_language *c, if ((unit & UNIT_PCT) == false) return CSS_INVALID; + /* Must be positive */ + if (length < 0) + return CSS_INVALID; + value = VOLUME_DIMENSION; } |