diff -ru4NwbB libpng-1.2.32/example.c libpng-1.2.33/example.c --- libpng-1.2.32/example.c 2008-09-18 04:48:01.734430400 -0500 +++ libpng-1.2.33/example.c 2008-10-31 08:42:01.872421072 -0500 @@ -1,9 +1,9 @@ #if 0 /* in case someone actually tries to compile this */ /* example.c - an example of using libpng - * Last changed in libpng 1.2.32 [October 31, 2008] + * Last changed in libpng 1.2.33 [October 31, 2008] * This file has been placed in the public domain by the authors. * Maintained 1998-2008 Glenn Randers-Pehrson * Maintained 1996, 1997 Andreas Dilger) * Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -203,9 +203,9 @@ png_set_palette_to_rgb(png_ptr); /* Expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */ if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) - png_set_gray_1_2_4_to_8(png_ptr); + png_set_expand_gray_1_2_4_to_8(png_ptr); /* Expand paletted or RGB images with transparency to full alpha channels * so the data will be available as RGBA quartets. */ diff -ru4NwbB libpng-1.2.32/png.h libpng-1.2.33/png.h --- libpng-1.2.32/png.h 2008-09-18 04:48:01.711532270 -0500 +++ libpng-1.2.33/png.h 2008-10-31 08:42:01.856878980 -0500 @@ -206,8 +206,13 @@ * 1.0.40rc01 10 10040 10.so.0.40[.0] * 1.2.32rc01 13 10232 12.so.0.32[.0] * 1.0.40 10 10040 10.so.0.40[.0] * 1.2.32 13 10232 12.so.0.32[.0] + * 1.2.33beta01-02 13 10233 12.so.0.33[.0] + * 1.2.33rc01-02 13 10233 12.so.0.33[.0] + * 1.0.41rc01 10 10041 10.so.0.41[.0] + * 1.2.33 13 10233 12.so.0.33[.0] + * 1.0.41 10 10041 10.so.0.41[.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.32/pngrutil.c libpng-1.2.33/pngrutil.c --- libpng-1.2.32/pngrutil.c 2008-09-18 04:48:01.842178854 -0500 +++ libpng-1.2.33/pngrutil.c 2008-10-31 08:42:01.948395150 -0500 @@ -1,8 +1,8 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.2.31 [August 19, 2008] + * Last changed in libpng 1.2.33 [October 31, 2008] * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2008 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.) @@ -1939,23 +1939,26 @@ length = (png_uint_32)65535L; } #endif - key = (png_charp)png_malloc_warn(png_ptr, length + 1); - if (key == NULL) + png_free(png_ptr, png_ptr->chunkdata); + png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); + if (png_ptr->chunkdata == NULL) { png_warning(png_ptr, "No memory to process text chunk."); return; } slength = (png_size_t)length; - png_crc_read(png_ptr, (png_bytep)key, slength); + png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength); if (png_crc_finish(png_ptr, skip)) { - png_free(png_ptr, key); + png_free(png_ptr, png_ptr->chunkdata); + png_ptr->chunkdata = NULL; return; } + key = png_ptr->chunkdata; key[slength] = 0x00; for (text = key; *text; text++) /* empty loop to find end of key */ ; @@ -1967,9 +1970,10 @@ (png_uint_32)png_sizeof(png_text)); if (text_ptr == NULL) { png_warning(png_ptr, "Not enough memory to process text chunk."); - png_free(png_ptr, key); + png_free(png_ptr, png_ptr->chunkdata); + png_ptr->chunkdata = NULL; return; } text_ptr->compression = PNG_TEXT_COMPRESSION_NONE; text_ptr->key = key; @@ -1982,9 +1986,10 @@ text_ptr->text_length = png_strlen(text); ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1); - png_free(png_ptr, key); + png_free(png_ptr, png_ptr->chunkdata); + png_ptr->chunkdata = NULL; png_free(png_ptr, text_ptr); if (ret) png_warning(png_ptr, "Insufficient memory to process text chunk."); } diff -ru4NwbB libpng-1.2.32/scripts/makefile.darwin libpng-1.2.33/scripts/makefile.darwin --- libpng-1.2.32/scripts/makefile.darwin 2008-09-18 04:48:05.484287099 -0500 +++ libpng-1.2.33/scripts/makefile.darwin 2008-10-31 08:42:03.356923116 -0500 @@ -103,16 +103,16 @@ $(LIBSOVER): $(OBJSDLL) $(CC) -dynamiclib \ -install_name $(LIBPATH)/$(LIBSOMAJ) \ - -current_version $(SONUM) -compatibility_version $(SONUM) \ + -current_version %SONUM% -compatibility_version %SONUM% \ -o $(LIBSOVER) \ $(OBJSDLL) -L$(ZLIBLIB) -lz $(OLDSOVER): $(OBJSDLL) $(CC) -dynamiclib \ -install_name $(LIBPATH)/$(OLDSOMAJ) \ - -current_version %OLDSONUM% -compatibility_version %OLDSONUM% \ + -current_version %OLDNUM% -compatibility_version %OLDNUM% \ -o $(OLDSOVER) \ $(OBJSDLL) -L$(ZLIBLIB) -lz pngtest: pngtest.o $(LIBSO)