Title: [123406] trunk
- Revision
- 123406
- Author
- [email protected]
- Date
- 2012-07-23 17:06:23 -0700 (Mon, 23 Jul 2012)
Log Message
Null-pointer crash when parsing border-image
https://bugs.webkit.org/show_bug.cgi?id=91963
Patch by Douglas Stockwell <[email protected]> on 2012-07-23
Reviewed by Darin Adler.
Source/WebCore:
Test: fast/css/border-image-fill-crash.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseBorderImageRepeat): Handle the case where
parseBorderImageRepeat is called when the value list is empty.
LayoutTests:
* fast/css/border-image-fill-crash-expected.txt: Added.
* fast/css/border-image-fill-crash.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (123405 => 123406)
--- trunk/LayoutTests/ChangeLog 2012-07-23 23:56:38 UTC (rev 123405)
+++ trunk/LayoutTests/ChangeLog 2012-07-24 00:06:23 UTC (rev 123406)
@@ -1,3 +1,13 @@
+2012-07-23 Douglas Stockwell <[email protected]>
+
+ Null-pointer crash when parsing border-image
+ https://bugs.webkit.org/show_bug.cgi?id=91963
+
+ Reviewed by Darin Adler.
+
+ * fast/css/border-image-fill-crash-expected.txt: Added.
+ * fast/css/border-image-fill-crash.html: Added.
+
2012-07-23 Bem Jones-Bey <[email protected]>
[CSS Exclusions] SVG shape errors should invalidate exclusion shapes
Added: trunk/LayoutTests/fast/css/border-image-fill-crash-expected.txt (0 => 123406)
--- trunk/LayoutTests/fast/css/border-image-fill-crash-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/css/border-image-fill-crash-expected.txt 2012-07-24 00:06:23 UTC (rev 123406)
@@ -0,0 +1 @@
+This test passes if it does not CRASH.
Added: trunk/LayoutTests/fast/css/border-image-fill-crash.html (0 => 123406)
--- trunk/LayoutTests/fast/css/border-image-fill-crash.html (rev 0)
+++ trunk/LayoutTests/fast/css/border-image-fill-crash.html 2012-07-24 00:06:23 UTC (rev 123406)
@@ -0,0 +1,8 @@
+<style>
+* { border-image: fill; }
+</style>
+This test passes if it does not CRASH.
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
Modified: trunk/Source/WebCore/ChangeLog (123405 => 123406)
--- trunk/Source/WebCore/ChangeLog 2012-07-23 23:56:38 UTC (rev 123405)
+++ trunk/Source/WebCore/ChangeLog 2012-07-24 00:06:23 UTC (rev 123406)
@@ -1,3 +1,16 @@
+2012-07-23 Douglas Stockwell <[email protected]>
+
+ Null-pointer crash when parsing border-image
+ https://bugs.webkit.org/show_bug.cgi?id=91963
+
+ Reviewed by Darin Adler.
+
+ Test: fast/css/border-image-fill-crash.html
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseBorderImageRepeat): Handle the case where
+ parseBorderImageRepeat is called when the value list is empty.
+
2012-07-23 Bem Jones-Bey <[email protected]>
[CSS Exclusions] SVG shape errors should invalidate exclusion shapes
Modified: trunk/Source/WebCore/css/CSSParser.cpp (123405 => 123406)
--- trunk/Source/WebCore/css/CSSParser.cpp 2012-07-23 23:56:38 UTC (rev 123405)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2012-07-24 00:06:23 UTC (rev 123406)
@@ -6084,6 +6084,8 @@
RefPtr<CSSPrimitiveValue> firstValue;
RefPtr<CSSPrimitiveValue> secondValue;
CSSParserValue* val = m_valueList->current();
+ if (!val)
+ return false;
if (isBorderImageRepeatKeyword(val->id))
firstValue = cssValuePool().createIdentifierValue(val->id);
else
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes