summaryrefslogtreecommitdiff
path: root/src/parse/properties.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-24 00:01:33 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-24 00:01:33 +0000
commit08d4f97429c94958f7f9b8f3cc7c42e5bde3e3cd (patch)
treef7117f2f9df3b4282ccba8a4b135ea37b108c11b /src/parse/properties.c
parentc4dfd7eb51a121239d048a865766769d6295bfb5 (diff)
downloadlibcss-08d4f97429c94958f7f9b8f3cc7c42e5bde3e3cd.tar.gz
libcss-08d4f97429c94958f7f9b8f3cc7c42e5bde3e3cd.tar.bz2
Font size values must be positive
svn path=/trunk/libcss/; revision=6211
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 275ad91..b646ecf 100644
--- a/src/parse/properties.c
+++ b/src/parse/properties.c
@@ -3029,6 +3029,10 @@ css_error parse_font_size(css_language *c,
if (unit & UNIT_ANGLE || unit & UNIT_TIME || unit & UNIT_FREQ)
return CSS_INVALID;
+ /* Negative values are not permitted */
+ if (length < 0)
+ return CSS_INVALID;
+
value = FONT_SIZE_DIMENSION;
}