summaryrefslogtreecommitdiff
path: root/src/parse/properties.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-24 14:36:14 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-24 14:36:14 +0000
commitbea57251fbd93e716be7cf3fd8413cd57cb71413 (patch)
tree3a41fb9ca4416adc5e773fe838273329e755d66b /src/parse/properties.c
parentde17837097a81636cefec79a946a1a161f6e8bed (diff)
downloadlibcss-bea57251fbd93e716be7cf3fd8413cd57cb71413.tar.gz
libcss-bea57251fbd93e716be7cf3fd8413cd57cb71413.tar.bz2
Range check richness values
svn path=/trunk/libcss/; revision=6243
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 3056a22..e85d66e 100644
--- a/src/parse/properties.c
+++ b/src/parse/properties.c
@@ -4916,6 +4916,10 @@ css_error parse_richness(css_language *c,
if (consumed != token->ilower->len)
return CSS_INVALID;
+ /* Must be between 0 and 100 */
+ if (num < 0 || num > F_100)
+ return CSS_INVALID;
+
value = RICHNESS_SET;
} else
return CSS_INVALID;