From: glennrp Date: Wed, 17 Apr 2013 12:58:15 +0000 (+0000) Subject: Handle benign errors as warnings in the PNG coder. X-Git-Tag: 7.0.1-0~3868 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a3a5f956194e91458e2789966ad15308e8f3df47;p=imagemagick Handle benign errors as warnings in the PNG coder. --- diff --git a/coders/png.c b/coders/png.c index 26f282d54..686a4cc29 100644 --- a/coders/png.c +++ b/coders/png.c @@ -2310,6 +2310,11 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, LockSemaphoreInfo(ping_semaphore); #endif +#if PNG_LIBPNG_VER >= 10400 + /* Allow benign errors */ + png_set_benign_errors(ping, 1); +#endif + /* Prepare PNG for reading. */ @@ -9321,6 +9326,11 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, LockSemaphoreInfo(ping_semaphore); #endif +#if PNG_LIBPNG_VER >= 10400 + /* Allow benign errors */ + png_set_benign_errors(ping, 1); +#endif + /* Prepare PNG for writing. */