summaryrefslogtreecommitdiffstats
path: root/extra/google-chrome/libpng-1.4.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extra/google-chrome/libpng-1.4.patch')
-rw-r--r--extra/google-chrome/libpng-1.4.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/extra/google-chrome/libpng-1.4.patch b/extra/google-chrome/libpng-1.4.patch
new file mode 100644
index 000000000..a3c4baf28
--- /dev/null
+++ b/extra/google-chrome/libpng-1.4.patch
@@ -0,0 +1,58 @@
+--- src/app/gfx/codec/png_codec.cc
++++ src/app/gfx/codec/png_codec.cc
+@@ -190,7 +190,7 @@ void DecodeInfoCallback(png_struct* png_ptr, png_info* info_ptr) {
+ unsigned long long total_size =
+ static_cast<unsigned long long>(w) * static_cast<unsigned long long>(h);
+ if (total_size > ((1 << 29) - 1))
+- longjmp(png_ptr->jmpbuf, 1);
++ longjmp(png_jmpbuf(png_ptr), 1);
+ state->width = static_cast<int>(w);
+ state->height = static_cast<int>(h);
+
+@@ -279,7 +279,7 @@ void DecodeInfoCallback(png_struct* png_ptr, png_info* info_ptr) {
+ }
+ } else {
+ NOTREACHED() << "Unknown input channels";
+- longjmp(png_ptr->jmpbuf, 1);
++ longjmp(png_jmpbuf(png_ptr), 1);
+ }
+
+ if (state->bitmap) {
+@@ -349,10 +349,7 @@ bool BuildPNGStruct(const unsigned char* input, size_t input_size,
+ if (png_sig_cmp(const_cast<unsigned char*>(input), 0, 8) != 0)
+ return false;
+
+- *png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
+- png_voidp_NULL,
+- png_error_ptr_NULL,
+- png_error_ptr_NULL);
++ *png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+ if (!*png_ptr)
+ return false;
+
+@@ -574,9 +571,7 @@ bool PNGCodec::Encode(const unsigned char* input, ColorFormat format,
+ DCHECK(input_color_components * w <= row_byte_width);
+
+ png_struct* png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,
+- png_voidp_NULL,
+- png_error_ptr_NULL,
+- png_error_ptr_NULL);
++ NULL, NULL, NULL);
+ if (!png_ptr)
+ return false;
+ png_info* info_ptr = png_create_info_struct(png_ptr);
+--- src/third_party/WebKit/WebCore/platform/image-encoders/skia/orig/PNGImageEncoder.cpp 2009-11-19 13:39:07.000000000 -0800
++++ src/third_party/WebKit/WebCore/platform/image-encoders/skia/PNGImageEncoder.cpp 2009-11-19 13:39:25.000000000 -0800
+@@ -130,9 +130,9 @@
+ }
+
+ png_struct* pngPtr = png_create_write_struct(PNG_LIBPNG_VER_STRING,
+- png_voidp_NULL,
+- png_error_ptr_NULL,
+- png_error_ptr_NULL);
++ NULL,
++ NULL,
++ NULL);
+ if (!pngPtr)
+ return false;
+