diff -ru4NwbB libpng-1.4.12/png.h libpng-1.4.13beta01/png.h --- libpng-1.4.12/png.h 2012-07-09 19:38:21.563699618 -0500 +++ libpng-1.4.13beta01/png.h 2012-12-10 10:06:16.981024537 -0600 @@ -169,8 +169,9 @@ * 1.4.10 14 10410 14.so.14.10[.0] * 1.4.11rc01 14 10411 14.so.14.11[.0] * 1.4.11 14 10411 14.so.14.11[.0] * 1.4.12 14 10412 14.so.14.12[.0] + * 1.4.13beta01 14 10413 14.so.14.13[.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 diff -ru4NwbB libpng-1.4.12/pngconf.h libpng-1.4.13beta01/pngconf.h --- libpng-1.4.12/pngconf.h 2012-07-09 19:38:21.573644597 -0500 +++ libpng-1.4.13beta01/pngconf.h 2012-12-10 10:06:16.990907813 -0600 @@ -1388,31 +1388,25 @@ # endif # ifndef PNG_NORETURN # define PNG_NORETURN __attribute__((__noreturn__)) # endif +# if __GNUC__ >= 3 # ifndef PNG_ALLOCATED # define PNG_ALLOCATED __attribute__((__malloc__)) # endif # ifndef PNG_DEPRECATED # define PNG_DEPRECATED __attribute__((__deprecated__)) # endif - - /* This specifically protects structure members that should only be - * accessed from within the library, therefore should be empty during - * a library build. - */ -# ifndef PNG_DEPSTRUCT -# define PNG_DEPSTRUCT __attribute__((__deprecated__)) -# endif # ifndef PNG_PRIVATE # if 0 /* Doesn't work so we use deprecated instead*/ # define PNG_PRIVATE \ __attribute__((warning("This function is not exported by libpng."))) # else # define PNG_PRIVATE \ __attribute__((__deprecated__)) # endif -# endif /* PNG_PRIVATE */ +# endif +# endif /* __GNUC__ >= 3 */ # endif /* __GNUC__ */ #endif /* PNG_PEDANTIC_WARNINGS */ #ifndef PNG_DEPRECATED diff -ru4NwbB libpng-1.4.12/pngset.c libpng-1.4.13beta01/pngset.c --- libpng-1.4.12/pngset.c 2012-07-09 19:38:21.687333269 -0500 +++ libpng-1.4.13beta01/pngset.c 2012-12-10 10:06:17.105713850 -0600 @@ -1,8 +1,8 @@ /* pngset.c - storage of image information into info struct * - * Last changed in libpng 1.4.11 [March 29, 2012] + * Last changed in libpng 1.4.13 [December 10, 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.) * @@ -835,8 +835,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_alpha != NULL) { /* It may not actually be necessary to set png_ptr->trans_alpha here; * we do it for backward compatibility with the way the png_handle_tRNS