about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2011-11-25 00:15:46 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2011-11-25 00:15:46 +0000
commit8d98333130874132f0b8a8038502e383fd000c43 (patch)
tree7cfac3d25345134cc60e1ba75cca9ee8210316e3
parent7923b359409c0a156ccaaa0789dbe949959f695f (diff)
downloadnetpbm-mirror-8d98333130874132f0b8a8038502e383fd000c43.tar.gz
netpbm-mirror-8d98333130874132f0b8a8038502e383fd000c43.tar.xz
netpbm-mirror-8d98333130874132f0b8a8038502e383fd000c43.zip
Release 10.35.83
git-svn-id: http://svn.code.sf.net/p/netpbm/code/super_stable@1602 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--Makefile.version2
-rw-r--r--converter/other/pngtopnm.c7
-rw-r--r--doc/HISTORY4
3 files changed, 12 insertions, 1 deletions
diff --git a/Makefile.version b/Makefile.version
index ed7dddee..ae0fc7bc 100644
--- a/Makefile.version
+++ b/Makefile.version
@@ -1,3 +1,3 @@
 NETPBM_MAJOR_RELEASE = 10
 NETPBM_MINOR_RELEASE = 35
-NETPBM_POINT_RELEASE = 82
+NETPBM_POINT_RELEASE = 83
diff --git a/converter/other/pngtopnm.c b/converter/other/pngtopnm.c
index 90d8705c..59149acd 100644
--- a/converter/other/pngtopnm.c
+++ b/converter/other/pngtopnm.c
@@ -313,6 +313,13 @@ png_info *info_ptr;
     };
 
   if (info_ptr->valid & PNG_INFO_tIME) {
+    if (info_ptr->mod_time.month < 1 ||
+      info_ptr->mod_time.month >= ARRAY_SIZE(month)) {
+      pm_message("tIME chunk in PNG input is invalid; "
+                 "modification time of image is unknown.  "
+                 "The month value, which should be in the range "
+                 "1-12, is %u", info_ptr->mod_time.month);
+    } else
     pm_message ("modification time: %02d %s %d %02d:%02d:%02d",
                 info_ptr->mod_time.day, month[info_ptr->mod_time.month],
                 info_ptr->mod_time.year, info_ptr->mod_time.hour,
diff --git a/doc/HISTORY b/doc/HISTORY
index 83907ba3..9c51e529 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,10 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+11.11.25 BJH  Release 10.35.83
+
+              pngtopnm: fix crash with invalid tIME chunk.  Always broken.
+
 11.09.25 BJH  Release 10.35.82
 
               pnmtopng: fix bug: with -alpha specifying a mask which contains