diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2011-11-22 22:08:01 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2011-11-22 22:08:01 +0000 |
commit | b455edade964edf9ff705814835b81e5b01403a5 (patch) | |
tree | 90bef5f8cccd2561689dfc8259b671f87ad6656b /converter | |
parent | 710952ec33cb9428f444bc2bcd4d29a1d24c5899 (diff) | |
download | netpbm-mirror-b455edade964edf9ff705814835b81e5b01403a5.tar.gz netpbm-mirror-b455edade964edf9ff705814835b81e5b01403a5.tar.xz netpbm-mirror-b455edade964edf9ff705814835b81e5b01403a5.zip |
Release 10.47.33
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@1601 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter')
-rw-r--r-- | converter/other/pngtopam.c | 7 | ||||
-rw-r--r-- | converter/other/pngtopnm.c | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/converter/other/pngtopam.c b/converter/other/pngtopam.c index 0eb00ee2..ee46ca0e 100644 --- a/converter/other/pngtopam.c +++ b/converter/other/pngtopam.c @@ -305,6 +305,13 @@ static void show_time (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/converter/other/pngtopnm.c b/converter/other/pngtopnm.c index 8a34df0d..a8ea25a7 100644 --- a/converter/other/pngtopnm.c +++ b/converter/other/pngtopnm.c @@ -484,6 +484,13 @@ showTime(struct pngx * const pngxP) { }; if (pngxP->info_ptr->valid & PNG_INFO_tIME) { + if (pngxP->info_ptr->mod_time.month < 1 || + pngxP->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", pngxP->info_ptr->mod_time.month); + } else pm_message("modification time: %02d %s %d %02d:%02d:%02d", pngxP->info_ptr->mod_time.day, month[pngxP->info_ptr->mod_time.month], |