From 30145f29c5f571f805febdb9a15093c12505c8d4 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Sun, 24 Nov 2013 13:33:07 -0600 Subject: [PATCH] [libpng16] Revised manual about handling of zlib CMF --- libpng-manual.txt | 15 ++++++++------- libpng.3 | 15 ++++++++------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/libpng-manual.txt b/libpng-manual.txt index ef90b34e8..8ef134cb8 100644 --- a/libpng-manual.txt +++ b/libpng-manual.txt @@ -5051,18 +5051,19 @@ The machine-generated configure files are no longer included in branches libpng16 and later of the GIT repository. They continue to be included in the tarball releases, however. -Libpng-1.6.0 and later use the CMF bytes at the beginning of the IDAT stream -to set the size of the sliding window for reading instead of using the default -32-kbyte sliding window size. It was discovered that there are hundreds of PNG -files in the wild that have incorrect CMF bytes that cause libpng to now issue -a "too far back" error and reject the file. Libpng-1.6.3 provides a way to -revert to the libpng-1.5.x behavior (ignoring the CMF bytes and using a +Libpng-1.6.0 through 1.6.2 used the CMF bytes at the beginning of the IDAT +stream to set the size of the sliding window for reading instead of using the +default 32-kbyte sliding window size. It was discovered that there are +hundreds of PNG files in the wild that have incorrect CMF bytes that caused +libpng to issue a "too far back" error and reject the file. Libpng-1.6.3 and +later calculate their own safe CMF from the image dimensions, provide a way +to revert to the libpng-1.5.x behavior (ignoring the CMF bytes and using a 32-kbyte sliding window), by using png_set_option(png_ptr, PNG_MAXIMUM_INFLATE_WINDOW, PNG_OPTION_ON); -and provides a tool (contrib/tools/pngfix) for optimizing the CMF bytes +and provide a tool (contrib/tools/pngfix) for optimizing the CMF bytes correctly. Libpng-1.6.0 and libpng-1.6.1 wrote uncompressed iTXt chunks with the wrong diff --git a/libpng.3 b/libpng.3 index 3742a5c75..622b4991c 100644 --- a/libpng.3 +++ b/libpng.3 @@ -5556,18 +5556,19 @@ The machine-generated configure files are no longer included in branches libpng16 and later of the GIT repository. They continue to be included in the tarball releases, however. -Libpng-1.6.0 and later use the CMF bytes at the beginning of the IDAT stream -to set the size of the sliding window for reading instead of using the default -32-kbyte sliding window size. It was discovered that there are hundreds of PNG -files in the wild that have incorrect CMF bytes that cause libpng to now issue -a "too far back" error and reject the file. Libpng-1.6.3 provides a way to -revert to the libpng-1.5.x behavior (ignoring the CMF bytes and using a +Libpng-1.6.0 through 1.6.2 used the CMF bytes at the beginning of the IDAT +stream to set the size of the sliding window for reading instead of using the +default 32-kbyte sliding window size. It was discovered that there are +hundreds of PNG files in the wild that have incorrect CMF bytes that caused +libpng to issue a "too far back" error and reject the file. Libpng-1.6.3 and +later calculate their own safe CMF from the image dimensions, provide a way +to revert to the libpng-1.5.x behavior (ignoring the CMF bytes and using a 32-kbyte sliding window), by using png_set_option(png_ptr, PNG_MAXIMUM_INFLATE_WINDOW, PNG_OPTION_ON); -and provides a tool (contrib/tools/pngfix) for optimizing the CMF bytes +and provide a tool (contrib/tools/pngfix) for optimizing the CMF bytes correctly. Libpng-1.6.0 and libpng-1.6.1 wrote uncompressed iTXt chunks with the wrong