diff -ru4NwbB libpng-1.2.50/configure.ac libpng-1.2.51beta03/configure.ac --- libpng-1.2.50/configure.ac 2012-07-09 19:37:11.299422964 -0500 +++ libpng-1.2.51beta03/configure.ac 2014-01-01 09:38:41.938402105 -0600 @@ -30,9 +30,9 @@ dnl End of version number stuff AC_CONFIG_SRCDIR([pngget.c]) -AM_CONFIG_HEADER(config.h) +AC_CONFIG_HEADERS([config.h]) # Checks for programs. AC_PROG_CC AC_PROG_LD diff -ru4NwbB libpng-1.2.50/contrib/gregbook/readpng.c libpng-1.2.51beta03/contrib/gregbook/readpng.c --- libpng-1.2.50/contrib/gregbook/readpng.c 2012-07-09 19:36:57.183048788 -0500 +++ libpng-1.2.51beta03/contrib/gregbook/readpng.c 2014-01-01 09:38:27.286755865 -0600 @@ -213,8 +213,12 @@ /* setjmp() must be called in every function that calls a PNG-reading * libpng function */ if (setjmp(png_jmpbuf(png_ptr))) { + free(image_data); + image_data = NULL; + free(row_pointers); + row_pointers = NULL; png_destroy_read_struct(&png_ptr, &info_ptr, NULL); return NULL; } diff -ru4NwbB libpng-1.2.50/contrib/pngminim/encoder/README libpng-1.2.51beta03/contrib/pngminim/encoder/README --- libpng-1.2.50/contrib/pngminim/encoder/README 2012-07-09 19:36:57.677368183 -0500 +++ libpng-1.2.51beta03/contrib/pngminim/encoder/README 2014-01-01 09:38:27.956142069 -0600 @@ -1,7 +1,7 @@ This demonstrates the use of PNG_USER_CONFIG and pngusr.h -To build a minimal write-only decoder with embedded libpng and zlib, run +To build a minimal write-only encoder with embedded libpng and zlib, run gather.sh # to collect needed files from pngminus, libpng, and zlib make diff -ru4NwbB libpng-1.2.50/png.c libpng-1.2.51beta03/png.c --- libpng-1.2.50/png.c 2012-07-09 19:36:56.931670273 -0500 +++ libpng-1.2.51beta03/png.c 2014-01-01 09:38:26.949843743 -0600 @@ -1,9 +1,9 @@ /* png.c - location for general purpose libpng functions * - * Last changed in libpng 1.2.46 [February 25, 2011] - * Copyright (c) 1998-2011 Glenn Randers-Pehrson + * Last changed in libpng 1.2.51 [January 1, 2014] + * Copyright (c) 1998-2014 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.) * * This code is released under the libpng license. @@ -724,15 +724,15 @@ #else #ifdef __STDC__ return ((png_charp) PNG_STRING_NEWLINE \ "libpng version 1.2.51beta03 - January 1, 2014" PNG_STRING_NEWLINE \ - "Copyright (c) 1998-2011 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ + "Copyright (c) 1998-2014 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 ((png_charp) "libpng version 1.2.51beta03 - January 1, 2014\ - Copyright (c) 1998-2011 Glenn Randers-Pehrson\ + Copyright (c) 1998-2014 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."); #endif #endif diff -ru4NwbB libpng-1.2.50/png.h libpng-1.2.51beta03/png.h --- libpng-1.2.50/png.h 2012-07-09 19:36:56.905164590 -0500 +++ libpng-1.2.51beta03/png.h 2014-01-01 09:38:26.923614194 -0600 @@ -1,8 +1,8 @@ /* png.h - header file for PNG reference library * * libpng version 1.2.51beta03 - January 1, 2014 - * Copyright (c) 1998-2012 Glenn Randers-Pehrson + * Copyright (c) 1998-2014 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.) * * This code is released under the libpng license (See LICENSE, below) @@ -283,8 +283,9 @@ * 1.0.59 10 10059 10.so.0.59[.0] * 1.2.49 13 10249 12.so.0.49[.0] * 1.0.60 10 10060 10.so.0.60[.0] * 1.2.50 13 10250 12.so.0.50[.0] + * 1.2.51beta01-03 13 10251 12.so.0.51[.0] * * Henceforth the source version will match the shared-library major * and minor numbers; the shared-library major version number will be * used for changes in backward compatibility, as it is intended. The @@ -315,9 +316,9 @@ * * This code is released under the libpng license. * * libpng versions 1.2.6, August 15, 2004, through 1.2.51beta03, January 1, 2014, are - * Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are + * Copyright (c) 2004, 2006-2013 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: * * Cosmin Truta diff -ru4NwbB libpng-1.2.50/pngconf.h libpng-1.2.51beta03/pngconf.h --- libpng-1.2.50/pngconf.h 2012-07-09 19:36:56.915063752 -0500 +++ libpng-1.2.51beta03/pngconf.h 2014-01-01 09:38:26.933561514 -0600 @@ -1,9 +1,9 @@ /* pngconf.h - machine configurable file for libpng * * libpng version 1.2.51beta03 - January 1, 2014 - * Copyright (c) 1998-2012 Glenn Randers-Pehrson + * 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.) * * This code is released under the libpng license. @@ -867,9 +867,9 @@ /* Added at libpng-1.2.43. To accept all valid PNGs no matter * how large, set these two limits to 0. */ #ifndef PNG_USER_CHUNK_CACHE_MAX -# define PNG_USER_CHUNK_CACHE_MAX 0 +# define PNG_USER_CHUNK_CACHE_MAX 32765 #endif /* Added at libpng-1.2.43 */ #ifndef PNG_USER_CHUNK_MALLOC_MAX diff -ru4NwbB libpng-1.2.50/pngrtran.c libpng-1.2.51beta03/pngrtran.c --- libpng-1.2.50/pngrtran.c 2012-07-09 19:36:56.996883555 -0500 +++ libpng-1.2.51beta03/pngrtran.c 2014-01-01 09:38:27.014387344 -0600 @@ -1,9 +1,9 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * Last changed in libpng 1.2.49 [March 29, 2012] - * Copyright (c) 1998-2012 Glenn Randers-Pehrson + * Last changed in libpng 1.2.51 [January 1, 2014] + * Copyright (c) 1998-2014 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.) * * This code is released under the libpng license. @@ -916,9 +916,12 @@ k=0; for (i=0; inum_trans; i++) { if (png_ptr->trans[i] != 0 && png_ptr->trans[i] != 0xff) + { k=1; /* Partial transparency is present */ + break; + } } if (k == 0) png_ptr->transformations &= ~PNG_GAMMA; } diff -ru4NwbB libpng-1.2.50/pngset.c libpng-1.2.51beta03/pngset.c --- libpng-1.2.50/pngset.c 2012-07-09 19:36:57.019705149 -0500 +++ libpng-1.2.51beta03/pngset.c 2014-01-01 09:38:27.077659241 -0600 @@ -1,9 +1,9 @@ /* pngset.c - storage of image information into info struct * - * Last changed in libpng 1.2.49 [March 29, 2012] - * Copyright (c) 1998-2012 Glenn Randers-Pehrson + * Last changed in libpng 1.2.51 [January 1, 2014] + * Copyright (c) 1998-2014 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.) * * This code is released under the libpng license. @@ -849,8 +849,14 @@ if (png_ptr == NULL || info_ptr == NULL) return; + if (num_trans < 0 || num_trans > PNG_MAX_PALETTE_LENGTH) + { + png_warning(png_ptr, "Ignoring invalid num_trans value"); + return; + } + if (trans != NULL) { /* It may not actually be necessary to set png_ptr->trans here; * we do it for backward compatibility with the way the png_handle_tRNS diff -ru4NwbB libpng-1.2.50/projects/xcode/libpng.xcodeproj/project.pbxproj libpng-1.2.51beta03/projects/xcode/libpng.xcodeproj/project.pbxproj --- libpng-1.2.50/projects/xcode/libpng.xcodeproj/project.pbxproj 2012-07-09 19:36:58.112649000 -0500 +++ libpng-1.2.51beta03/projects/xcode/libpng.xcodeproj/project.pbxproj 2014-01-01 09:38:28.563147801 -0600 @@ -221,9 +221,9 @@ buildSettings = { COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 3; DYLIB_CURRENT_VERSION = 3; - FRAMEWORK_VERSION = 1.2.50; + FRAMEWORK_VERSION = 1.2.51beta03; GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = ""; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; @@ -239,9 +239,9 @@ isa = XCBuildConfiguration; buildSettings = { DYLIB_COMPATIBILITY_VERSION = 3; DYLIB_CURRENT_VERSION = 3; - FRAMEWORK_VERSION = 1.2.50; + FRAMEWORK_VERSION = 1.2.51beta03; GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = ""; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@executable_path/../Frameworks";