Reviewed by Maciej.
http://bugs.webkit.org/show_bug.cgi?id=14516
Bug 14516: crash loading multipart/x-mixed-replace data on windows safari
NULL check m_resourceData to prevent a crash in Safari on Windows.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::clearResourceData):
2007-07-06 Tony Chang <idealisms@gmail.com>
Reviewed by Maciej.
http://bugs.webkit.org/show_bug.cgi?id=14516
Bug 14516: crash loading multipart/x-mixed-replace data on windows safari
* http/tests/multipart/resources/multipart-nodashes.php: Added.
* http/tests/multipart/win-boundary-crash-expected.txt: Added.
* http/tests/multipart/win-boundary-crash.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@24053
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-07-06 Tony Chang <idealisms@gmail.com>
+
+ Reviewed by Maciej.
+
+ http://bugs.webkit.org/show_bug.cgi?id=14516
+ Bug 14516: crash loading multipart/x-mixed-replace data on windows safari
+
+ * http/tests/multipart/resources/multipart-nodashes.php: Added.
+ * http/tests/multipart/win-boundary-crash-expected.txt: Added.
+ * http/tests/multipart/win-boundary-crash.html: Added.
+
2007-07-06 Jungshik Shin <jungshik.shin@gmail.com>
Reviewed by Alexey.
--- /dev/null
+<?php
+ # Generates a multipart/x-mixed-replace response but doesn't
+ # include the -- before the boundary.
+
+ $boundary = "cutHere";
+ header("Content-Type: multipart/x-mixed-replace; boundary=$boundary");
+ echo("$boundary\r\n");
+ echo("Content-Type: image/png\r\n\r\n");
+ echo(file_get_contents("green-100x100.png"));
+?>
--- /dev/null
+Test for http://bugs.webkit.org/show_bug.cgi?id=14516 crash loading multipart/x-mixed-replace data on windows safari
+
+If WebKit does not crash when loading this img, then it passed.
+
+
--- /dev/null
+<html>
+<head>
+<script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+</script>
+</head>
+<body>
+<p>Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=14516">http://bugs.webkit.org/show_bug.cgi?id=14516</a>
+crash loading multipart/x-mixed-replace data on windows safari</i></p>
+<p>If WebKit does not crash when loading this img, then it passed.</p>
+<img src="resources/multipart-nodashes.php" />
+</body>
+</html>
+2007-07-06 Tony Chang <idealisms@gmail.com>
+
+ Reviewed by Maciej.
+
+ http://bugs.webkit.org/show_bug.cgi?id=14516
+ Bug 14516: crash loading multipart/x-mixed-replace data on windows safari
+
+ NULL check m_resourceData to prevent a crash in Safari on Windows.
+
+ * loader/ResourceLoader.cpp:
+ (WebCore::ResourceLoader::clearResourceData):
+
2007-07-06 Jungshik Shin <jungshik.shin@gmail.com>
Reviewed by Alexey.
void ResourceLoader::clearResourceData()
{
- m_resourceData->clear();
+ if (m_resourceData)
+ m_resourceData->clear();
}
void ResourceLoader::willSendRequest(ResourceRequest& request, const ResourceResponse& redirectResponse)