From 39d9ccf53902e13d4604f28153e65d4ef2e78336 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 24 Jan 2009 13:35:04 +0000 Subject: Ensure padding values are positive svn path=/trunk/libcss/; revision=6233 --- src/parse/properties.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/parse/properties.c') 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; } -- cgit v1.2.3