summaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-24 13:15:04 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-24 13:15:04 +0000
commit6fc9d00e80afacf71233b908db213103cb013db5 (patch)
tree66f736db7071270a025556ac1ba233a1be1325e5 /src/parse
parentdd70ac9144b7f23fd530243c33931641fb150cc2 (diff)
downloadlibcss-6fc9d00e80afacf71233b908db213103cb013db5.tar.gz
libcss-6fc9d00e80afacf71233b908db213103cb013db5.tar.bz2
Ensure max-height and min-height values are positive
svn path=/trunk/libcss/; revision=6228
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/properties.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/parse/properties.c b/src/parse/properties.c
index f7979ef..69ff9f9 100644
--- a/src/parse/properties.c
+++ b/src/parse/properties.c
@@ -3703,6 +3703,10 @@ css_error parse_max_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 = MAX_HEIGHT_SET;
}
@@ -3829,6 +3833,10 @@ css_error parse_min_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 = MIN_HEIGHT_SET;
}