aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/codec/SkPngCodec.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/codec/SkPngCodec.cpp b/src/codec/SkPngCodec.cpp
index 9df7bc67e1..df22121b4c 100644
--- a/src/codec/SkPngCodec.cpp
+++ b/src/codec/SkPngCodec.cpp
@@ -22,6 +22,7 @@
#include "SkTemplates.h"
#include "SkUtils.h"
+#define PNG_SET_OPTION_SUPPORTED
#include "png.h"
#include <algorithm>
@@ -787,6 +788,10 @@ static SkCodec::Result read_header(SkStream* stream, SkPngChunkReader* chunkRead
return SkCodec::kInternalError;
}
+ // This setting ensures that we display images with incorrect CMF bytes.
+ // See crbug.com/807324.
+ png_set_option(png_ptr, PNG_MAXIMUM_INFLATE_WINDOW, PNG_OPTION_ON);
+
AutoCleanPng autoClean(png_ptr, stream, chunkReader, outCodec);
png_infop info_ptr = png_create_info_struct(png_ptr);