Author: jmb
Date: Sat Jan 24 07:10:35 2009
New Revision: 6227

URL: http://source.netsurf-browser.org?rev=6227&view=rev
Log:
Ensure line-height values are positive

Modified:
    trunk/libcss/src/parse/properties.c

Modified: trunk/libcss/src/parse/properties.c
URL: 
http://source.netsurf-browser.org/trunk/libcss/src/parse/properties.c?rev=6227&r1=6226&r2=6227&view=diff
==============================================================================
--- trunk/libcss/src/parse/properties.c (original)
+++ trunk/libcss/src/parse/properties.c Sat Jan 24 07:10:35 2009
@@ -3448,6 +3448,10 @@
                if (consumed != token->ilower->len)
                        return CSS_INVALID;
 
+               /* Negative values are illegal */
+               if (length < 0)
+                       return CSS_INVALID;
+
                parserutils_vector_iterate(vector, ctx);
                value = LINE_HEIGHT_NUMBER;
        } else {
@@ -3457,6 +3461,10 @@
                        return error;
 
                if (unit & UNIT_ANGLE || unit & UNIT_TIME || unit & UNIT_FREQ)
+                       return CSS_INVALID;
+
+               /* Negative values are illegal */
+               if (length < 0)
                        return CSS_INVALID;
 
                value = LINE_HEIGHT_DIMENSION;


_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to