Author: jmb
Date: Sat Jan 24 07:15:04 2009
New Revision: 6228
URL: http://source.netsurf-browser.org?rev=6228&view=rev
Log:
Ensure max-height and min-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=6228&r1=6227&r2=6228&view=diff
==============================================================================
--- trunk/libcss/src/parse/properties.c (original)
+++ trunk/libcss/src/parse/properties.c Sat Jan 24 07:15:04 2009
@@ -3703,6 +3703,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_HEIGHT_SET;
}
@@ -3827,6 +3831,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_HEIGHT_SET;
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org