diff -up advancecomp-1.15/lib/png.c.me advancecomp-1.15/lib/png.c
--- advancecomp-1.15/lib/png.c.me 2019-06-11 13:17:33.265490986 +0200
+++ advancecomp-1.15/lib/png.c 2019-06-11 13:21:50.655818111 +0200
@@ -656,6 +656,11 @@ adv_error adv_png_read_ihdr(
}
*pix_pixel = pixel;
+ if (width_align < width) {
+ error_unsupported_set("Invalid image size");
+ goto err;
+ }
+
if (data[10] != 0) { /* compression */
error_unsupported_set("Unsupported compression, %d instead of 0", (unsigned)data[10]);
goto err;