Binary files libpng-1.2.51/contrib/gregbook/toucan.png and libpng-1.2.52beta01/contrib/gregbook/toucan.png differ diff -ru4NwbB libpng-1.2.51/png.c libpng-1.2.52beta01/png.c --- libpng-1.2.51/png.c 2014-02-05 21:52:35.433884357 -0600 +++ libpng-1.2.52beta01/png.c 2014-11-06 08:22:05.436702163 -0600 @@ -1,8 +1,8 @@ /* png.c - location for general purpose libpng functions * - * Last changed in libpng 1.2.51 [November 6, 2014] + * Last changed in libpng 1.2.51 [February 6, 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.) * diff -ru4NwbB libpng-1.2.51/pngerror.c libpng-1.2.52beta01/pngerror.c --- libpng-1.2.51/pngerror.c 2014-02-05 21:52:35.440306374 -0600 +++ libpng-1.2.52beta01/pngerror.c 2014-11-06 08:22:05.441618181 -0600 @@ -1,8 +1,8 @@ /* pngerror.c - stub functions for i/o and memory allocation * - * Last changed in libpng 1.2.51 [November 6, 2014] + * Last changed in libpng 1.2.51 [February 6, 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.) * diff -ru4NwbB libpng-1.2.51/pngget.c libpng-1.2.52beta01/pngget.c --- libpng-1.2.51/pngget.c 2014-02-05 21:52:35.453330100 -0600 +++ libpng-1.2.52beta01/pngget.c 2014-11-06 08:22:05.451661077 -0600 @@ -1,8 +1,8 @@ /* pngget.c - retrieval of values from info struct * - * Last changed in libpng 1.2.51 [November 6, 2014] + * Last changed in libpng 1.2.51 [February 6, 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.) * diff -ru4NwbB libpng-1.2.51/png.h libpng-1.2.52beta01/png.h --- libpng-1.2.51/png.h 2014-02-05 21:52:35.407113281 -0600 +++ libpng-1.2.52beta01/png.h 2014-11-06 08:22:05.414634541 -0600 @@ -287,8 +287,9 @@ * 1.2.51beta01-05 13 10251 12.so.0.51[.0] * 1.2.51rc01-04 13 10251 12.so.0.51[.0] * 1.0.61 10 10061 10.so.0.61[.0] * 1.2.51 13 10251 12.so.0.51[.0] + * 1.2.52beta01 13 10252 12.so.0.52[.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.2.51/pngread.c libpng-1.2.52beta01/pngread.c --- libpng-1.2.51/pngread.c 2014-02-05 21:52:35.477534294 -0600 +++ libpng-1.2.52beta01/pngread.c 2014-11-06 08:22:05.474471383 -0600 @@ -1,8 +1,8 @@ /* pngread.c - read a PNG file * - * Last changed in libpng 1.2.51 [November 6, 2014] + * Last changed in libpng 1.2.51 [February 6, 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.) * @@ -99,16 +99,22 @@ #endif png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn); - if (user_png_ver) + if (user_png_ver != NULL) { - i = 0; + int found_dots = 0; + i = -1; + do { - if (user_png_ver[i] != png_libpng_ver[i]) + i++; + if (user_png_ver[i] != PNG_LIBPNG_VER_STRING[i]) png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; - } while (png_libpng_ver[i++]); + if (user_png_ver[i] == '.') + found_dots++; + } while (found_dots < 2 && user_png_ver[i] != 0 && + PNG_LIBPNG_VER_STRING[i] != 0); } else png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; diff -ru4NwbB libpng-1.2.51/pngrtran.c libpng-1.2.52beta01/pngrtran.c --- libpng-1.2.51/pngrtran.c 2014-02-05 21:52:35.499852025 -0600 +++ libpng-1.2.52beta01/pngrtran.c 2014-11-06 08:22:05.499395214 -0600 @@ -1,8 +1,8 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * Last changed in libpng 1.2.51 [November 6, 2014] + * Last changed in libpng 1.2.51 [February 6, 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.) * @@ -1378,8 +1378,11 @@ if (png_ptr->transformations & PNG_EXPAND) { if (png_ptr->row_info.color_type == PNG_COLOR_TYPE_PALETTE) { + if (png_ptr->palette == NULL) + png_error (png_ptr, "Palette is NULL in indexed image"); + png_do_expand_palette(&(png_ptr->row_info), png_ptr->row_buf + 1, png_ptr->palette, png_ptr->trans, png_ptr->num_trans); } else diff -ru4NwbB libpng-1.2.51/pngrutil.c libpng-1.2.52beta01/pngrutil.c --- libpng-1.2.51/pngrutil.c 2014-02-05 21:52:35.514001301 -0600 +++ libpng-1.2.52beta01/pngrutil.c 2014-11-06 08:22:05.511882855 -0600 @@ -1,8 +1,8 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.2.51 [November 6, 2014] + * Last changed in libpng 1.2.51 [February 6, 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.) * diff -ru4NwbB libpng-1.2.51/pngset.c libpng-1.2.52beta01/pngset.c --- libpng-1.2.51/pngset.c 2014-02-05 21:52:35.522671353 -0600 +++ libpng-1.2.52beta01/pngset.c 2014-11-06 08:22:05.519239330 -0600 @@ -1,8 +1,8 @@ /* pngset.c - storage of image information into info struct * - * Last changed in libpng 1.2.51 [November 6, 2014] + * Last changed in libpng 1.2.51 [February 6, 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.) * diff -ru4NwbB libpng-1.2.51/pngtest.c libpng-1.2.52beta01/pngtest.c --- libpng-1.2.51/pngtest.c 2014-02-05 21:52:35.532199767 -0600 +++ libpng-1.2.52beta01/pngtest.c 2014-11-06 08:22:05.529252072 -0600 @@ -1,8 +1,8 @@ /* pngtest.c - a simple test program to test libpng * - * Last changed in libpng 1.2.51 [November 6, 2014] + * Last changed in libpng 1.2.51 [February 6, 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.) * diff -ru4NwbB libpng-1.2.51/pngwrite.c libpng-1.2.52beta01/pngwrite.c --- libpng-1.2.51/pngwrite.c 2014-02-05 21:52:35.560268933 -0600 +++ libpng-1.2.52beta01/pngwrite.c 2014-11-06 08:22:05.552374392 -0600 @@ -1,8 +1,8 @@ /* pngwrite.c - general routines to write a PNG file * - * Last changed in libpng 1.2.51 [November 6, 2014] + * Last changed in libpng 1.2.51 [February 6, 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.) * @@ -524,17 +524,25 @@ png_set_mem_fn(png_ptr, mem_ptr, malloc_fn, free_fn); #endif /* PNG_USER_MEM_SUPPORTED */ png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn); - if (user_png_ver) + if (user_png_ver != NULL) { - i = 0; + int found_dots = 0; + i = -1; + do { - if (user_png_ver[i] != png_libpng_ver[i]) + i++; + if (user_png_ver[i] != PNG_LIBPNG_VER_STRING[i]) png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; - } while (png_libpng_ver[i++]); + if (user_png_ver[i] == '.') + found_dots++; + } while (found_dots < 2 && user_png_ver[i] != 0 && + PNG_LIBPNG_VER_STRING[i] != 0); } + else + png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH) { /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so @@ -684,9 +692,10 @@ png_warning(png_ptr, "Application uses deprecated png_write_init() and should be recompiled."); #endif } - } while (png_libpng_ver[i++]); + i++; + } while (png_libpng_ver[i] != 0 && user_png_ver[i] != 0); png_debug(1, "in png_write_init_3"); #ifdef PNG_SETJMP_SUPPORTED diff -ru4NwbB libpng-1.2.51/projects/xcode/libpng.xcodeproj/project.pbxproj libpng-1.2.52beta01/projects/xcode/libpng.xcodeproj/project.pbxproj --- libpng-1.2.51/projects/xcode/libpng.xcodeproj/project.pbxproj 2014-02-05 21:52:36.615657482 -0600 +++ libpng-1.2.52beta01/projects/xcode/libpng.xcodeproj/project.pbxproj 2014-11-06 08:22:06.451840829 -0600 @@ -221,9 +221,9 @@ buildSettings = { COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 3; DYLIB_CURRENT_VERSION = 3; - FRAMEWORK_VERSION = 1.2.51; + FRAMEWORK_VERSION = 1.2.52beta01; 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.51; + FRAMEWORK_VERSION = 1.2.52beta01; GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = ""; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@executable_path/../Frameworks";