summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-01-24 14:35:10 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-01-24 14:35:10 +0000
commitde17837097a81636cefec79a946a1a161f6e8bed (patch)
tree08678d4c4acb688e9c21a2ffe09105e1bab5fca5
parent8b18c22a23dc5f7093403ac8febdb22fe105ebef (diff)
downloadlibcss-de17837097a81636cefec79a946a1a161f6e8bed.tar.gz
libcss-de17837097a81636cefec79a946a1a161f6e8bed.tar.bz2
Ensure pitch values are positive
svn path=/trunk/libcss/; revision=6242
-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 2a5cbef..3056a22 100644
--- a/src/parse/properties.c
+++ b/src/parse/properties.c
@@ -4565,6 +4565,10 @@ css_error parse_pitch(css_language *c,
if ((unit & UNIT_FREQ) == false)
return CSS_INVALID;
+ /* Negative values are invalid */
+ if (length < 0)
+ return CSS_INVALID;
+
value = PITCH_FREQUENCY;
}