Reviewed by Anders.
- test for http://bugzilla.opendarwin.org/show_bug.cgi?id=10202
REGRESSION: Repro crash when loading an empty image document
* fast/tokenizer/image-empty-crash-expected.txt: Added.
* fast/tokenizer/image-empty-crash.html: Added.
WebCore:
Reviewed by Anders.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10202
REGRESSION: Repro crash when loading an empty image document
Test: fast/tokenizer/image-empty-crash.html
* loader/ImageDocument.cpp:
(WebCore::ImageTokenizer::stopParsing): Added null check for m_imageElement.
(WebCore::ImageTokenizer::finish): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15766
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-08-03 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ Reviewed by Anders.
+
+ - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=10202
+ REGRESSION: Repro crash when loading an empty image document
+
+ * fast/tokenizer/image-empty-crash-expected.txt: Added.
+ * fast/tokenizer/image-empty-crash.html: Added.
+
2006-08-02 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
--- /dev/null
+This is a test for http://bugzilla.opendarwin.org/show_bug.cgi?id=10202 REGRESSION: Repro crash when loading an empty image document.
+
+No crash means test PASS.
+
+
--- /dev/null
+<html>
+<head>
+ <title></title>
+ <script type="text/javascript">
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+ </script>
+</head>
+<body>
+ <p>
+ This is a test for <i><a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=10202">http://bugzilla.opendarwin.org/show_bug.cgi?id=10202</a>
+ REGRESSION: Repro crash when loading an empty image document</i>.
+ </p>
+ <p>
+ No crash means test PASS.
+ </p>
+ <hr>
+ <iframe src="data:image/png,"></iframe>
+</body>
+</html>
+2006-08-03 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ Reviewed by Anders.
+
+ - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10202
+ REGRESSION: Repro crash when loading an empty image document
+
+ Test: fast/tokenizer/image-empty-crash.html
+
+ * loader/ImageDocument.cpp:
+ (WebCore::ImageTokenizer::stopParsing): Added null check for m_imageElement.
+ (WebCore::ImageTokenizer::finish): Ditto.
+
2006-08-03 Darin Adler <darin@apple.com>
Reviewed by Anders.
void ImageTokenizer::stopParsing()
{
Tokenizer::stopParsing();
- m_imageElement->cachedImage()->error();
+ if (m_imageElement)
+ m_imageElement->cachedImage()->error();
}
void ImageTokenizer::finish()
{
- if (!m_parserStopped) {
+ if (!m_parserStopped && m_imageElement) {
CachedImage* cachedImage = m_imageElement->cachedImage();
Vector<char>& buffer = cachedImage->bufferData(0, 0, 0);
cachedImage->data(buffer, true);