diff -ru4NwbB libpng-1.4.6/png.h libpng-1.4.7rc01/png.h --- libpng-1.4.6/png.h 2011-04-08 11:58:23.937816625 -0500 +++ libpng-1.4.7rc01/png.h 2011-04-08 20:51:19.917199114 -0500 @@ -155,8 +155,9 @@ * 1.4.5 14 10405 14.so.14.5[.0] * 1.4.6beta01-07 14 10406 14.so.14.6[.0] * 1.4.6rc01 14 10406 14.so.14.6[.0] * 1.4.6 14 10406 14.so.14.6[.0] + * 1.4.7rc01 14 10407 14.so.14.7[.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.6/pngwutil.c libpng-1.4.7rc01/pngwutil.c --- libpng-1.4.6/pngwutil.c 2011-04-08 11:58:24.109706123 -0500 +++ libpng-1.4.7rc01/pngwutil.c 2011-04-08 20:51:20.087078761 -0500 @@ -681,8 +681,11 @@ */ if (length >= 2 && png_ptr->height < 16384 && png_ptr->width < 16384) { + unsigned int z_cinfo; + unsigned int half_z_window_size; + /* Compute the maximum possible length of the datastream */ /* Number of pixels, plus for each row a filter byte and possible * and possibly a padding byte, so increase the maximum @@ -699,10 +702,10 @@ if (png_ptr->interlaced) uncompressed_idat_size += ((png_ptr->height + 7)/8) * (png_ptr->bit_depth < 8 ? 12 : 6); - unsigned int z_cinfo = z_cmf >> 4; - unsigned int half_z_window_size = 1 << (z_cinfo + 7); + z_cinfo = z_cmf >> 4; + half_z_window_size = 1 << (z_cinfo + 7); while (uncompressed_idat_size <= half_z_window_size && half_z_window_size >= 256) { z_cinfo--;