From 92d39a1aed41499e4ad9b45d0d5df67857280950 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Wed, 31 Jan 2024 03:48:49 +0100 Subject: [PATCH] Fix for broken `png_check_sig` in libpng 1.6.41 (#332) See https://github.com/pnggroup/libpng/issues/534 The bug report says that `png_check_sig` was deprecated many years ago. --- layer0/MyPNG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layer0/MyPNG.cpp b/layer0/MyPNG.cpp index 65c36a1cc..69331c77e 100644 --- a/layer0/MyPNG.cpp +++ b/layer0/MyPNG.cpp @@ -407,7 +407,7 @@ std::unique_ptr MyPNGRead(const char *file_name) } if(ok) { - ret = png_check_sig(buf, 8); + ret = !png_sig_cmp(buf, 0, 8); if(!ret) ok = false; }