From ac5c869827ef71dcb90fc6ff517fc1e6bf21de33 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 25 Jan 2009 00:03:38 +0000 Subject: Width values must be positive svn path=/trunk/libcss/; revision=6259 --- src/parse/properties.c | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- cgit v1.2.3