diff -r -U 3 libpng-1.2.5/pngread.c libpng-1.2.5patch07/pngread.c
--- libpng-1.2.5/pngread.c	Thu Oct  3 06:32:29 2002
+++ libpng-1.2.5patch07/pngread.c	Fri Jul 23 19:01:39 2004
@@ -1299,6 +1299,9 @@
     */
    png_read_info(png_ptr, info_ptr);
 
+   if (info_ptr->height > PNG_UINT_32_MAX/sizeof(png_bytep))
+      png_error(png_ptr,"Image is too high to process with png_read_png()");
+
    /* -------------- image transformations start here ------------------- */
 
 #if defined(PNG_READ_16_TO_8_SUPPORTED)