summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-24 13:07:25 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-24 13:07:25 +0000
commitf33438df2240d186de94e44c74ce66bd3bd0db12 (patch)
tree21de958bb145c36793808b11837e9510ebbe0499
parent926809529b6fd4b385b76a4b7589b03cd0cde929 (diff)
downloadlibcss-f33438df2240d186de94e44c74ce66bd3bd0db12.tar.gz
libcss-f33438df2240d186de94e44c74ce66bd3bd0db12.tar.bz2
Ensure height values are positive
svn path=/trunk/libcss/; revision=6226
-rw-r--r--src/parse/properties.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parse/properties.c b/src/parse/properties.c
index b646ecf..b6ace4a 100644
--- a/src/parse/properties.c
+++ b/src/parse/properties.c
@@ -3249,6 +3249,10 @@ css_error parse_height(css_language *c,
if (unit & UNIT_ANGLE || unit & UNIT_TIME || unit & UNIT_FREQ)
return CSS_INVALID;
+ /* Negative height is illegal */
+ if (length < 0)
+ return CSS_INVALID;
+
value = HEIGHT_SET;
}