diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2012-03-19 06:19:40 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2012-03-19 18:16:05 -0500 |
commit | 5a13159bfcd42c0092472150c4d22589dea7931e (patch) | |
tree | 71a65f63b8e9a64e001b4fd4d83aed539eb19e57 /pngrutil.c | |
parent | ae1b45a04699235546b4d725aa4eceec138ffacd (diff) | |
download | libpng-5a13159bfcd42c0092472150c4d22589dea7931e.tar.gz |
[master] Imported from libpng-1.5.10rc01.tar
Diffstat (limited to 'pngrutil.c')
-rw-r--r-- | pngrutil.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pngrutil.c b/pngrutil.c index 74822a92b..fe6585ed2 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1257,13 +1257,16 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) /* Should be an error, but we can cope with it */ png_warning(png_ptr, "Out of place iCCP chunk"); - if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP)) + if ((png_ptr->mode & PNG_HAVE_iCCP) || (info_ptr != NULL && + (info_ptr->valid & (PNG_INFO_iCCP|PNG_INFO_sRGB)))) { png_warning(png_ptr, "Duplicate iCCP chunk"); png_crc_finish(png_ptr, length); return; } + png_ptr->mode |= PNG_HAVE_iCCP; + #ifdef PNG_MAX_MALLOC_64K if (length > (png_uint_32)65535L) { |