+
+ if (width * height > 1000000) // 1000x1000 or equiv.
+ {
+ eDebug("[png_load] image size is %d x %d, which is \"too large\".", width, height);
+ png_read_end(png_ptr, info_ptr);
+ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+ fclose(fh);
+ return 0;
+ }
+