Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1418)

Unified Diff: third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp

Issue 2766263002: Refactor PNGImageDecoder's call to setSize (Closed)
Patch Set: Single return statement Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp b/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp
index e84ddb6aa08cf78a45fb79a19b7e13e1f5e9f0e5..df1073901ba14881cdd58c0a5d114c667a7a88dd 100644
--- a/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp
@@ -1043,4 +1043,11 @@ TEST(PNGTests, VerifyFrameCompleteBehavior) {
}
}
+TEST(PNGTests, sizeMayOverflow) {
+ auto decoder =
+ createDecoderWithPngData("/LayoutTests/images/resources/crbug702934.png");
+ EXPECT_FALSE(decoder->isSizeAvailable());
+ EXPECT_TRUE(decoder->failed());
+}
+
}; // namespace blink

Powered by Google App Engine
This is Rietveld 408576698