From 6daa18cca0ba412a3c511f5a358aa15e67bb9264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 19 Jul 2021 17:09:26 +0200 Subject: [PATCH] Hack around #14628. The icon is distorted but at least no crash. Seems like a clear bug in libpng. --- ext/libpng17/pngread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/libpng17/pngread.c b/ext/libpng17/pngread.c index 96a5a1b4b4..71ddc01fe1 100644 --- a/ext/libpng17/pngread.c +++ b/ext/libpng17/pngread.c @@ -3997,7 +3997,8 @@ png_image_read_direct(png_voidp argument) # endif /* This is actually an internal error. */ - affirm(out_format == format /* else unimplemented transformations */); + // HACK to prevent crash: See issue #14628 + // affirm(out_format == format /* else unimplemented transformations */); } /* Now read the rows. If do_local_compose is set then it is necessary to use