diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-02-28 13:35:14 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-02-28 13:35:14 +0400 |
commit | 5a81e16627e1e42814be9e42a2cb8c9c04dc2a31 (patch) | |
tree | 1a4e3e4f965b08cfaf8583ed977670d47b67ca0c /src/thirdparty/libpng | |
parent | e838448dbb720e1bd7e33ad1545180ebb8590a4c (diff) |
* update lcms to the latest git
* update libpng to v1.5.9
* update Changelog
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@4108 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/thirdparty/libpng')
-rw-r--r-- | src/thirdparty/libpng/CHANGES | 20 | ||||
-rw-r--r-- | src/thirdparty/libpng/LICENSE | 4 | ||||
-rw-r--r-- | src/thirdparty/libpng/README | 2 | ||||
-rw-r--r-- | src/thirdparty/libpng/png.c | 6 | ||||
-rw-r--r-- | src/thirdparty/libpng/png.h | 24 | ||||
-rw-r--r-- | src/thirdparty/libpng/pngconf.h | 2 | ||||
-rw-r--r-- | src/thirdparty/libpng/pngerror.c | 2 | ||||
-rw-r--r-- | src/thirdparty/libpng/pnglibconf.h | 4 | ||||
-rw-r--r-- | src/thirdparty/libpng/pngpread.c | 19 | ||||
-rw-r--r-- | src/thirdparty/libpng/pngrutil.c | 30 | ||||
-rw-r--r-- | src/thirdparty/libpng/pngstruct.h | 6 |
11 files changed, 66 insertions, 53 deletions
diff --git a/src/thirdparty/libpng/CHANGES b/src/thirdparty/libpng/CHANGES index f5df45568..fb3a90be8 100644 --- a/src/thirdparty/libpng/CHANGES +++ b/src/thirdparty/libpng/CHANGES @@ -3782,7 +3782,7 @@ Version 1.5.8beta01 [January 15, 2011] Moved AC_MSG_CHECKING([if libraries can be versioned]) later to the proper
location in configure.ac (Gilles Espinasse).
Fix bug in pngerror.c: some long warnings were being improperly truncated
- (bug introduced in libpng-1.5.3beta05).
+ (CVE-2011-3464, bug introduced in libpng-1.5.3beta05).
Version 1.5.8rc01 [January 21, 2012]
No changes.
@@ -3791,6 +3791,24 @@ Version 1.5.8rc02 [January 25, 2012] Fixed Min/GW uninstall to remove libpng.dll.a
Conditionalize the install rules for MINGW and CYGWIN in CMakeLists.txt
+Version 1.5.8 [February 1, 2012]
+ No changes.
+
+Version 1.5.9beta01 [February 3, 2012]
+ Rebuilt configure scripts in the tar distributions.
+
+Version 1.5.9beta02 [February 16, 2012]
+ Removed two unused definitions from scripts/pnglibconf.h.prebuilt
+ Removed some unused arrays (with #ifdef) from png_read_push_finish_row().
+ Removed tests for no-longer-used *_EMPTY_PLTE_SUPPORTED from pngstruct.h
+
+Version 1.5.9rc01 [February 17, 2012]
+ Fixed CVE-2011-3026 buffer overrun bug. Deal more correctly with the test
+ on iCCP chunk length. Also removed spurious casts that may hide problems
+ on 16-bit systems.
+
+Version 1.5.9 [February 18, 2012]
+ No changes.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
diff --git a/src/thirdparty/libpng/LICENSE b/src/thirdparty/libpng/LICENSE index 007875099..0c927409a 100644 --- a/src/thirdparty/libpng/LICENSE +++ b/src/thirdparty/libpng/LICENSE @@ -10,7 +10,7 @@ this sentence. This code is released under the libpng license.
-libpng versions 1.2.6, August 15, 2004, through 1.5.8, February 1, 2012, are
+libpng versions 1.2.6, August 15, 2004, through 1.5.9, February 18, 2012, are
Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@@ -108,4 +108,4 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-February 1, 2012
+February 18, 2012
diff --git a/src/thirdparty/libpng/README b/src/thirdparty/libpng/README index c9dc29ef0..c648a5ad7 100644 --- a/src/thirdparty/libpng/README +++ b/src/thirdparty/libpng/README @@ -1,4 +1,4 @@ -README for libpng version 1.5.8 - February 1, 2012 (shared library 15.0)
+README for libpng version 1.5.9 - February 18, 2012 (shared library 15.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
diff --git a/src/thirdparty/libpng/png.c b/src/thirdparty/libpng/png.c index 80e90a8b3..5a490b2d9 100644 --- a/src/thirdparty/libpng/png.c +++ b/src/thirdparty/libpng/png.c @@ -14,7 +14,7 @@ #include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_5_8 Your_png_h_is_not_version_1_5_8;
+typedef png_libpng_version_1_5_9 Your_png_h_is_not_version_1_5_9;
/* Tells libpng that we have already handled the first "num_bytes" bytes
* of the PNG file signature. If the PNG data is embedded into another
@@ -655,13 +655,13 @@ png_get_copyright(png_const_structp png_ptr) #else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
- "libpng version 1.5.8 - February 1, 2012" PNG_STRING_NEWLINE \
+ "libpng version 1.5.9 - February 18, 2012" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2011 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
- return "libpng version 1.5.8 - February 1, 2012\
+ return "libpng version 1.5.9 - February 18, 2012\
Copyright (c) 1998-2011 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
diff --git a/src/thirdparty/libpng/png.h b/src/thirdparty/libpng/png.h index 98bb8a9d0..81267675a 100644 --- a/src/thirdparty/libpng/png.h +++ b/src/thirdparty/libpng/png.h @@ -1,7 +1,7 @@ /* png.h - header file for PNG reference library
*
- * libpng version 1.5.8 - February 1, 2012
+ * libpng version 1.5.9 - February 18, 2012
* Copyright (c) 1998-2012 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.)
@@ -11,7 +11,7 @@ * Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
- * libpng versions 0.97, January 1998, through 1.5.8 - February 1, 2012: Glenn
+ * libpng versions 0.97, January 1998, through 1.5.9 - February 18, 2012: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@@ -168,6 +168,10 @@ * 1.5.7 15 10507 15.so.15.7[.0]
* 1.5.8beta01 15 10508 15.so.15.8[.0]
* 1.5.8rc01 15 10508 15.so.15.8[.0]
+ * 1.5.8 15 10508 15.so.15.8[.0]
+ * 1.5.9beta01-02 15 10509 15.so.15.9[.0]
+ * 1.5.9rc01 15 10509 15.so.15.9[.0]
+ * 1.5.9 15 10509 15.so.15.9[.0]
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@@ -199,7 +203,7 @@ *
* This code is released under the libpng license.
*
- * libpng versions 1.2.6, August 15, 2004, through 1.5.8, February 1, 2012, are
+ * libpng versions 1.2.6, August 15, 2004, through 1.5.9, February 18, 2012, are
* Copyright (c) 2004, 2006-2012 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors:
@@ -311,13 +315,13 @@ * Y2K compliance in libpng:
* =========================
*
- * February 1, 2012
+ * February 18, 2012
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
- * upward through 1.5.8 are Y2K compliant. It is my belief that
+ * upward through 1.5.9 are Y2K compliant. It is my belief that
* earlier versions were also Y2K compliant.
*
* Libpng only has two year fields. One is a 2-byte unsigned integer
@@ -375,9 +379,9 @@ */
/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.5.8"
+#define PNG_LIBPNG_VER_STRING "1.5.9"
#define PNG_HEADER_VERSION_STRING \
- " libpng version 1.5.8 - February 1, 2012\n"
+ " libpng version 1.5.9 - February 18, 2012\n"
#define PNG_LIBPNG_VER_SONUM 15
#define PNG_LIBPNG_VER_DLLNUM 15
@@ -385,7 +389,7 @@ /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 5
-#define PNG_LIBPNG_VER_RELEASE 8
+#define PNG_LIBPNG_VER_RELEASE 9
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
@@ -416,7 +420,7 @@ * version 1.0.0 was mis-numbered 100 instead of 10000). From
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
*/
-#define PNG_LIBPNG_VER 10508 /* 1.5.8 */
+#define PNG_LIBPNG_VER 10509 /* 1.5.9 */
/* Library configuration: these options cannot be changed after
* the library has been built.
@@ -538,7 +542,7 @@ extern "C" { /* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
-typedef char* png_libpng_version_1_5_8;
+typedef char* png_libpng_version_1_5_9;
/* Three color definitions. The order of the red, green, and blue, (and the
* exact size) is not important, although the size of the fields need to
diff --git a/src/thirdparty/libpng/pngconf.h b/src/thirdparty/libpng/pngconf.h index a1701cf7f..3fea47b86 100644 --- a/src/thirdparty/libpng/pngconf.h +++ b/src/thirdparty/libpng/pngconf.h @@ -1,7 +1,7 @@ /* pngconf.h - machine configurable file for libpng
*
- * libpng version 1.5.8 - February 1, 2012
+ * libpng version 1.5.9 - February 18, 2012
*
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/src/thirdparty/libpng/pngerror.c b/src/thirdparty/libpng/pngerror.c index f3154071a..9df97f583 100644 --- a/src/thirdparty/libpng/pngerror.c +++ b/src/thirdparty/libpng/pngerror.c @@ -1,7 +1,7 @@ /* pngerror.c - stub functions for i/o and memory allocation
*
- * Last changed in libpng 1.5.7 [February 1, 2012]
+ * Last changed in libpng 1.5.8 [February 1, 2011]
* Copyright (c) 1998-2012 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.)
diff --git a/src/thirdparty/libpng/pnglibconf.h b/src/thirdparty/libpng/pnglibconf.h index 06d6cdeb9..36447ce95 100644 --- a/src/thirdparty/libpng/pnglibconf.h +++ b/src/thirdparty/libpng/pnglibconf.h @@ -3,7 +3,7 @@ /* pnglibconf.h - library build configuration */
-/* Libpng 1.5.8 - February 1, 2012 */
+/* Libpng 1.5.9 - February 18, 2012 */
/* Copyright (c) 1998-2011 Glenn Randers-Pehrson */
@@ -54,8 +54,6 @@ #define PNG_FIXED_POINT_SUPPORTED
#define PNG_FLOATING_ARITHMETIC_SUPPORTED
#define PNG_FLOATING_POINT_SUPPORTED
-#define PNG_FORMAT_AFIRST_SUPPORTED
-#define PNG_FORMAT_BGR_SUPPORTED
#define PNG_gAMA_SUPPORTED
#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
#define PNG_hIST_SUPPORTED
diff --git a/src/thirdparty/libpng/pngpread.c b/src/thirdparty/libpng/pngpread.c index ca7607a66..eda5a6c80 100644 --- a/src/thirdparty/libpng/pngpread.c +++ b/src/thirdparty/libpng/pngpread.c @@ -1,7 +1,7 @@ /* pngpread.c - read a png file in push mode
*
- * Last changed in libpng 1.5.7 [December 15, 2011]
+ * Last changed in libpng 1.5.9 [February 18, 2012]
* Copyright (c) 1998-2011 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.)
@@ -730,8 +730,7 @@ png_push_save_buffer(png_structp png_ptr) new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256;
old_buffer = png_ptr->save_buffer;
- png_ptr->save_buffer = (png_bytep)png_malloc_warn(png_ptr,
- (png_size_t)new_max);
+ png_ptr->save_buffer = (png_bytep)png_malloc_warn(png_ptr, new_max);
if (png_ptr->save_buffer == NULL)
{
@@ -1201,6 +1200,7 @@ png_push_process_row(png_structp png_ptr) void /* PRIVATE */
png_read_push_finish_row(png_structp png_ptr)
{
+#ifdef PNG_READ_INTERLACING_SUPPORTED
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Start of interlace block */
@@ -1219,6 +1219,7 @@ png_read_push_finish_row(png_structp png_ptr) * it, uncomment it here and in png.h
static PNG_CONST png_byte FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
*/
+#endif
png_ptr->row_number++;
if (png_ptr->row_number < png_ptr->num_rows)
@@ -1285,8 +1286,7 @@ png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 }
#endif
- png_ptr->current_text = (png_charp)png_malloc(png_ptr,
- (png_size_t)(length + 1));
+ png_ptr->current_text = (png_charp)png_malloc(png_ptr, length + 1);
png_ptr->current_text[length] = '\0';
png_ptr->current_text_ptr = png_ptr->current_text;
png_ptr->current_text_size = (png_size_t)length;
@@ -1384,8 +1384,7 @@ png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 }
#endif
- png_ptr->current_text = (png_charp)png_malloc(png_ptr,
- (png_size_t)(length + 1));
+ png_ptr->current_text = (png_charp)png_malloc(png_ptr, length + 1);
png_ptr->current_text[length] = '\0';
png_ptr->current_text_ptr = png_ptr->current_text;
png_ptr->current_text_size = (png_size_t)length;
@@ -1586,8 +1585,7 @@ png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 }
#endif
- png_ptr->current_text = (png_charp)png_malloc(png_ptr,
- (png_size_t)(length + 1));
+ png_ptr->current_text = (png_charp)png_malloc(png_ptr, length + 1);
png_ptr->current_text[length] = '\0';
png_ptr->current_text_ptr = png_ptr->current_text;
png_ptr->current_text_size = (png_size_t)length;
@@ -1732,8 +1730,7 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 */
PNG_CSTRING_FROM_CHUNK(png_ptr->unknown_chunk.name, png_ptr->chunk_name);
- /* The following cast should be safe because of the check above. */
- png_ptr->unknown_chunk.size = (png_size_t)length;
+ png_ptr->unknown_chunk.size = length;
if (length == 0)
png_ptr->unknown_chunk.data = NULL;
diff --git a/src/thirdparty/libpng/pngrutil.c b/src/thirdparty/libpng/pngrutil.c index 62e963220..7b4557f5a 100644 --- a/src/thirdparty/libpng/pngrutil.c +++ b/src/thirdparty/libpng/pngrutil.c @@ -1,8 +1,8 @@ /* pngrutil.c - utilities to read a PNG file
*
- * Last changed in libpng 1.5.7 [December 15, 2011]
- * Copyright (c) 1998-2011 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.9 [February 18, 2012]
+ * Copyright (c) 1998-2012 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.)
*
@@ -432,15 +432,18 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, /* Now check the limits on this chunk - if the limit fails the
* compressed data will be removed, the prefix will remain.
*/
+ if (prefix_size >= (~(png_size_t)0) - 1 ||
+ expanded_size >= (~(png_size_t)0) - 1 - prefix_size
#ifdef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
- if (png_ptr->user_chunk_malloc_max &&
+ || (png_ptr->user_chunk_malloc_max &&
(prefix_size + expanded_size >= png_ptr->user_chunk_malloc_max - 1))
#else
# ifdef PNG_USER_CHUNK_MALLOC_MAX
- if ((PNG_USER_CHUNK_MALLOC_MAX > 0) &&
+ || ((PNG_USER_CHUNK_MALLOC_MAX > 0) &&
prefix_size + expanded_size >= PNG_USER_CHUNK_MALLOC_MAX - 1)
# endif
#endif
+ )
png_warning(png_ptr, "Exceeded size limit while expanding chunk");
/* If the size is zero either there was an error and a message
@@ -448,12 +451,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, * and we have nothing to do - the code will exit through the
* error case below.
*/
-#if defined(PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED) || \
- defined(PNG_USER_CHUNK_MALLOC_MAX)
else if (expanded_size > 0)
-#else
- if (expanded_size > 0)
-#endif
{
/* Success (maybe) - really uncompress the chunk. */
png_size_t new_size = 0;
@@ -1279,7 +1277,7 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = (png_charp)png_malloc(png_ptr, length + 1);
- slength = (png_size_t)length;
+ slength = length;
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
if (png_crc_finish(png_ptr, skip))
@@ -1429,7 +1427,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) * that the PNG_MAX_MALLOC_64K test is enabled in this case, but this is a
* potential breakage point if the types in pngconf.h aren't exactly right.
*/
- slength = (png_size_t)length;
+ slength = length;
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
if (png_crc_finish(png_ptr, skip))
@@ -1956,7 +1954,7 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) return;
}
- slength = (png_size_t)length;
+ slength = length;
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
if (png_crc_finish(png_ptr, 0))
@@ -2105,7 +2103,7 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) return;
}
- slength = (png_size_t)length;
+ slength = length;
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
png_ptr->chunkdata[slength] = 0x00; /* Null terminate the last string */
@@ -2265,7 +2263,7 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) return;
}
- slength = (png_size_t)length;
+ slength = length;
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
if (png_crc_finish(png_ptr, skip))
@@ -2373,7 +2371,7 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) return;
}
- slength = (png_size_t)length;
+ slength = length;
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
if (png_crc_finish(png_ptr, 0))
@@ -2504,7 +2502,7 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) return;
}
- slength = (png_size_t)length;
+ slength = length;
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
if (png_crc_finish(png_ptr, 0))
diff --git a/src/thirdparty/libpng/pngstruct.h b/src/thirdparty/libpng/pngstruct.h index 4466b045d..1824c4911 100644 --- a/src/thirdparty/libpng/pngstruct.h +++ b/src/thirdparty/libpng/pngstruct.h @@ -5,7 +5,7 @@ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
- * Last changed in libpng 1.5.5 [September 22, 2011]
+ * Last changed in libpng 1.5.9 [February 18, 2012]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -283,9 +283,7 @@ struct png_struct_def #endif
/* New member added in libpng-1.0.4 (renamed in 1.0.9) */
-#if defined(PNG_MNG_FEATURES_SUPPORTED) || \
- defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
- defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
+#if defined(PNG_MNG_FEATURES_SUPPORTED)
/* Changed from png_byte to png_uint_32 at version 1.2.0 */
png_uint_32 mng_features_permitted;
#endif
|