From: Glenn Randers-Pehrson Date: Wed, 13 Sep 2017 00:32:45 +0000 (-0400) Subject: Fix maximum minute in PNG tIME chunk X-Git-Tag: 7.0.7-3~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1e9e64d781aedbcf48d1b19f1fdd8f514fcec5ce;p=imagemagick Fix maximum minute in PNG tIME chunk --- diff --git a/ChangeLog b/ChangeLog index f62ee6fcd..b1fb00639 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2017-09-12 7.0.7-3 Glenn Randers-Pehrson - * Maximum valid hour is 23, not 24, in the PNG tIME chunk. + * Maximum valid hour is 23, not 24, in the PNG tIME chunk, + and maximum valid minute is 59, not 60. 2017-09-12 7.0.7-2 Cristy * Release ImageMagick version 7.0.7-2, GIT revision 21089:4e46ad9dd:20170912. diff --git a/coders/png.c b/coders/png.c index e4c15fbd8..d41bdfb78 100644 --- a/coders/png.c +++ b/coders/png.c @@ -8198,7 +8198,7 @@ static void write_tIME_chunk(Image *image,png_struct *ping,png_info *info, month++; year--; } - if (minute > 60) + if (minute > 59) { hour++; minute-=60;