summaryrefslogtreecommitdiff
path: root/pngerror.c
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@acm.org>2012-08-25 16:21:46 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2012-08-25 16:21:46 -0500
commit14d0ca620e35ff3583a75211233aee30f9e52914 (patch)
tree8f85afd73d8c83d36aab4a1b0e13c651670bec12 /pngerror.c
parent80102172011d24fbb143cabd4f5b75558c78ade9 (diff)
downloadlibpng-14d0ca620e35ff3583a75211233aee30f9e52914.tar.gz
[libpng16] Cleaned up and corrected ICC profile handling.
contrib/libtests/makepng: corrected 'rgb' and 'gray' cases. profile_error messages could be truncated; made a correct buffer size calculation and adjusted pngerror.c appropriately. png_icc_check_* checking improved; changed the functions to receive the correct color type of the PNG on read or write and check that it matches the color space of the profile (despite what the comments said before, there is danger in assuming the app will cope correctly with an RGB profile on a grayscale image and, since it violates the PNG spec, allowing it is certain to produce inconsistent app behavior and might even cause app crashes.) Check that profiles contain the tags needed to process the PNG (tags all required by the ICC spec). Removed unused PNG_STATIC from pngpriv.h.
Diffstat (limited to 'pngerror.c')
-rw-r--r--pngerror.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pngerror.c b/pngerror.c
index 0a0eeefbc..dbc6534ba 100644
--- a/pngerror.c
+++ b/pngerror.c
@@ -415,7 +415,7 @@ static PNG_CONST char png_digit[16] = {
'A', 'B', 'C', 'D', 'E', 'F'
};
-#define PNG_MAX_ERROR_TEXT 64
+#define PNG_MAX_ERROR_TEXT 196 /* Currently limited be profile_error in png.c */
#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_ERROR_TEXT_SUPPORTED)
static void /* PRIVATE */
png_format_buffer(png_const_structrp png_ptr, png_charp buffer, png_const_charp