Title: [226692] branches/safari-605-branch
- Revision
- 226692
- Author
- [email protected]
- Date
- 2018-01-09 20:31:56 -0800 (Tue, 09 Jan 2018)
Log Message
Cherry-pick r226638. rdar://problem/36392286
Modified Paths
Diff
Modified: branches/safari-605-branch/LayoutTests/ChangeLog (226691 => 226692)
--- branches/safari-605-branch/LayoutTests/ChangeLog 2018-01-10 04:31:53 UTC (rev 226691)
+++ branches/safari-605-branch/LayoutTests/ChangeLog 2018-01-10 04:31:56 UTC (rev 226692)
@@ -1,5 +1,22 @@
2018-01-09 Jason Marcell <[email protected]>
+ Cherry-pick r226638. rdar://problem/36392286
+
+ 2018-01-09 Said Abou-Hallawa <[email protected]>
+
+ Check Image::m_image is not null in ImageLoader::decode()
+ https://bugs.webkit.org/show_bug.cgi?id=180386
+ <rdar://problem/34634483>
+
+ Reviewed by Tim Horton.
+
+ Add a new rejected case for decoding an image with an invalid URL.
+
+ * fast/images/decode-static-image-reject-expected.txt:
+ * fast/images/decode-static-image-reject.html:
+
+2018-01-09 Jason Marcell <[email protected]>
+
Cherry-pick r226617. rdar://problem/36392336
2018-01-09 Ryosuke Niwa <[email protected]>
Modified: branches/safari-605-branch/LayoutTests/fast/images/decode-static-image-reject-expected.txt (226691 => 226692)
--- branches/safari-605-branch/LayoutTests/fast/images/decode-static-image-reject-expected.txt 2018-01-10 04:31:53 UTC (rev 226691)
+++ branches/safari-605-branch/LayoutTests/fast/images/decode-static-image-reject-expected.txt 2018-01-10 04:31:56 UTC (rev 226692)
@@ -6,6 +6,7 @@
Failed to decode image with no source. Result is: EncodingError: Missing source URL.
Failed to decode image with non-existent source. Result is: EncodingError: Loading error.
Failed to decode image with unsupported image format. Result is: EncodingError: Loading error.
+Failed to decode image with invalid URL. Result is: EncodingError: Loading error.
PASS successfullyParsed is true
TEST COMPLETE
Modified: branches/safari-605-branch/LayoutTests/fast/images/decode-static-image-reject.html (226691 => 226692)
--- branches/safari-605-branch/LayoutTests/fast/images/decode-static-image-reject.html 2018-01-10 04:31:53 UTC (rev 226691)
+++ branches/safari-605-branch/LayoutTests/fast/images/decode-static-image-reject.html 2018-01-10 04:31:56 UTC (rev 226692)
@@ -21,6 +21,11 @@
})
.catch(reason => {
debug("Failed to decode image with unsupported image format. Result is: " + reason);
+ image.src = ""
+ return image.decode();
+ })
+ .catch(reason => {
+ debug("Failed to decode image with invalid URL. Result is: " + reason);
finishJSTest();
});
</script>
Modified: branches/safari-605-branch/Source/WebCore/ChangeLog (226691 => 226692)
--- branches/safari-605-branch/Source/WebCore/ChangeLog 2018-01-10 04:31:53 UTC (rev 226691)
+++ branches/safari-605-branch/Source/WebCore/ChangeLog 2018-01-10 04:31:56 UTC (rev 226692)
@@ -1,5 +1,22 @@
2018-01-09 Jason Marcell <[email protected]>
+ Cherry-pick r226638. rdar://problem/36392286
+
+ 2018-01-09 Said Abou-Hallawa <[email protected]>
+
+ Check Image::m_image is not null in ImageLoader::decode()
+ https://bugs.webkit.org/show_bug.cgi?id=180386
+ <rdar://problem/34634483>
+
+ Reviewed by Tim Horton.
+
+ Ensure ImageLoader::m_image is not null before referencing it.
+
+ * loader/ImageLoader.cpp:
+ (WebCore::ImageLoader::decode):
+
+2018-01-09 Jason Marcell <[email protected]>
+
Cherry-pick r226628. rdar://problem/36392341
2018-01-09 Youenn Fablet <[email protected]>
Modified: branches/safari-605-branch/Source/WebCore/loader/ImageLoader.cpp (226691 => 226692)
--- branches/safari-605-branch/Source/WebCore/loader/ImageLoader.cpp 2018-01-10 04:31:53 UTC (rev 226691)
+++ branches/safari-605-branch/Source/WebCore/loader/ImageLoader.cpp 2018-01-10 04:31:56 UTC (rev 226692)
@@ -412,12 +412,12 @@
return;
}
- Image* image = m_image->image();
- if (!image || m_image->errorOccurred()) {
+ if (!m_image || !m_image->image() || m_image->errorOccurred()) {
decodeError("Loading error.");
return;
}
+ Image* image = m_image->image();
if (!image->isBitmapImage()) {
decodeError("Invalid image type.");
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes