diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-01-24 13:10:35 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-01-24 13:10:35 +0000 |
commit | dd70ac9144b7f23fd530243c33931641fb150cc2 (patch) | |
tree | 0be6683c9dc3cc6e32087940505d7a0f7cd8896d /src/parse | |
parent | f33438df2240d186de94e44c74ce66bd3bd0db12 (diff) | |
download | libcss-dd70ac9144b7f23fd530243c33931641fb150cc2.tar.gz libcss-dd70ac9144b7f23fd530243c33931641fb150cc2.tar.bz2 |
Ensure line-height values are positive
svn path=/trunk/libcss/; revision=6227
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 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; } |