summaryrefslogtreecommitdiff
path: root/src/parse/properties.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-25 00:03:38 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-25 00:03:38 +0000
commitac5c869827ef71dcb90fc6ff517fc1e6bf21de33 (patch)
treeebfdeadf4a6187c9b73aa8084cd996b58301f2c9 /src/parse/properties.c
parent285834ebd9ed5296d7ffb0b829b6147841d44711 (diff)
downloadlibcss-ac5c869827ef71dcb90fc6ff517fc1e6bf21de33.tar.gz
libcss-ac5c869827ef71dcb90fc6ff517fc1e6bf21de33.tar.bz2
Width values must be positive
svn path=/trunk/libcss/; revision=6259
Diffstat (limited to 'src/parse/properties.c')
-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 38fc58b..67479dc 100644
--- a/src/parse/properties.c
+++ b/src/parse/properties.c
@@ -6412,6 +6412,10 @@ css_error parse_width(css_language *c,
if (unit & UNIT_ANGLE || unit & UNIT_TIME || unit & UNIT_FREQ)
return CSS_INVALID;
+ /* Must be positive */
+ if (length < 0)
+ return CSS_INVALID;
+
value = WIDTH_SET;
}