diff options
Diffstat (limited to 'media-libs/libpng/files/libpng-1.6.1-Corrected-length-written-to-uncompressed-iT.patch')
-rw-r--r-- | media-libs/libpng/files/libpng-1.6.1-Corrected-length-written-to-uncompressed-iT.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/media-libs/libpng/files/libpng-1.6.1-Corrected-length-written-to-uncompressed-iT.patch b/media-libs/libpng/files/libpng-1.6.1-Corrected-length-written-to-uncompressed-iT.patch new file mode 100644 index 000000000000..37f9d50189e3 --- /dev/null +++ b/media-libs/libpng/files/libpng-1.6.1-Corrected-length-written-to-uncompressed-iT.patch @@ -0,0 +1,47 @@ +From 9bb775fc8cbde98fca150992efe227937b9278ff Mon Sep 17 00:00:00 2001 +From: Glenn Randers-Pehrson <glennrp at users.sourceforge.net> +Date: Sat, 13 Apr 2013 14:19:25 -0500 +Subject: [PATCH 1/5] [libpng16] Corrected length written to uncompressed iTXt + chunks (Samuli Suominen). + +--- + ANNOUNCE | 1 + + CHANGES | 1 + + pngwutil.c | 6 +++--- + 3 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/pngwutil.c b/pngwutil.c +index 8c49cfd..8f66937 100644 +--- a/pngwutil.c ++++ b/pngwutil.c +@@ -1,7 +1,7 @@ + + /* pngwutil.c - utilities to write a PNG file + * +- * Last changed in libpng 1.6.0 [February 14, 2013] ++ * Last changed in libpng 1.6.2 [(PENDING RELEASE)] + * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) +@@ -1738,16 +1738,16 @@ png_write_iTXt(png_structrp png_ptr, int compression, png_const_charp key, + { + if (png_text_compress(png_ptr, png_iTXt, &comp, prefix_len) != Z_OK) + png_error(png_ptr, png_ptr->zstream.msg); ++ png_write_chunk_header(png_ptr, png_iTXt, comp.output_len + prefix_len); + } + + else + { + if (comp.input_len > PNG_UINT_31_MAX-prefix_len) + png_error(png_ptr, "iTXt: uncompressed text too long"); ++ png_write_chunk_header(png_ptr, png_iTXt, strlen(text) + prefix_len); + } + +- png_write_chunk_header(png_ptr, png_iTXt, comp.output_len + prefix_len); +- + png_write_chunk_data(png_ptr, new_key, key_len); + + png_write_chunk_data(png_ptr, (png_const_bytep)lang, lang_len); +-- +1.8.1.5 + |