From 1e9e64d781aedbcf48d1b19f1fdd8f514fcec5ce Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Tue, 12 Sep 2017 20:32:45 -0400 Subject: [PATCH] Fix maximum minute in PNG tIME chunk --- ChangeLog | 3 ++- coders/png.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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; -- 2.40.0