Author: jmb
Date: Sat Jan 24 07:17:23 2009
New Revision: 6229

URL: http://source.netsurf-browser.org?rev=6229&view=rev
Log:
Ensure max-width and min-width 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=6229&r1=6228&r2=6229&view=diff
==============================================================================
--- trunk/libcss/src/parse/properties.c (original)
+++ trunk/libcss/src/parse/properties.c Sat Jan 24 07:17:23 2009
@@ -3772,6 +3772,10 @@
                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;
        }
 
@@ -3896,6 +3900,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 = MIN_WIDTH_SET;


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

Reply via email to