summaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-24 13:35:04 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-24 13:35:04 +0000
commit39d9ccf53902e13d4604f28153e65d4ef2e78336 (patch)
tree754d56d551f8bd996c156ec28dc14af7fa628e34 /src/parse
parentb5ace38c94691ef5dfdb56fe0a5711d59ec73017 (diff)
downloadlibcss-39d9ccf53902e13d4604f28153e65d4ef2e78336.tar.gz
libcss-39d9ccf53902e13d4604f28153e65d4ef2e78336.tar.bz2
Ensure padding values are positive
svn path=/trunk/libcss/; revision=6233
Diffstat (limited to 'src/parse')
-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 e3133c1..239947c 100644
--- a/src/parse/properties.c
+++ b/src/parse/properties.c
@@ -7079,6 +7079,10 @@ css_error parse_padding_side(css_language *c,
if (unit & UNIT_ANGLE || unit & UNIT_TIME || unit & UNIT_FREQ)
return CSS_INVALID;
+ /* Negative lengths are invalid */
+ if (length < 0)
+ return CSS_INVALID;
+
value = PADDING_SET;
}