diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-01-24 13:17:23 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-01-24 13:17:23 +0000 |
commit | 76d4f965aefaaddbf912e41e6476986e54b1e4d4 (patch) | |
tree | 5593125871878a2119d4bd51a756cf29fb9f7f1c /src/parse/properties.c | |
parent | 6fc9d00e80afacf71233b908db213103cb013db5 (diff) | |
download | libcss-76d4f965aefaaddbf912e41e6476986e54b1e4d4.tar.gz libcss-76d4f965aefaaddbf912e41e6476986e54b1e4d4.tar.bz2 |
Ensure max-width and min-width values are positive
svn path=/trunk/libcss/; revision=6229
Diffstat (limited to 'src/parse/properties.c')
-rw-r--r-- | src/parse/properties.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/parse/properties.c b/src/parse/properties.c index 69ff9f9..f9b8c4c 100644 --- a/src/parse/properties.c +++ b/src/parse/properties.c @@ -3772,6 +3772,10 @@ css_error parse_max_width(css_language *c, if (unit & UNIT_ANGLE || unit & UNIT_TIME || unit & UNIT_FREQ) return CSS_INVALID; + /* Negative values are illegal */ + if (length < 0) + return CSS_INVALID; + value = MAX_WIDTH_SET; } @@ -3898,6 +3902,10 @@ css_error parse_min_width(css_language *c, if (unit & UNIT_ANGLE || unit & UNIT_TIME || unit & UNIT_FREQ) return CSS_INVALID; + /* Negative values are illegal */ + if (length < 0) + return CSS_INVALID; + value = MIN_WIDTH_SET; } |