From c33d62498877e95e0657fc82d9cc469bdeac6f66 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Sat, 5 Aug 2017 11:01:18 -0500 Subject: [PATCH] [libpng] Added huge_IDAT.png and empty_ancillary_chunks.png to testpngs/crashers Make pngtest --strict, --relax, --xfail options imply -m (multiple). --- ANNOUNCE | 2 ++ CHANGES | 2 ++ .../testpngs/crashers/empty_ancillary_chunks.png | Bin 0 -> 694 bytes pngtest.c | 15 +++++++++------ tests/pngtest-badpngs | 1 + 5 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 contrib/testpngs/crashers/empty_ancillary_chunks.png diff --git a/ANNOUNCE b/ANNOUNCE index fda8c598f..26284628a 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -82,6 +82,8 @@ Version 1.6.32beta10 [August 5, 2017] Version 1.6.32beta11 [August 5, 2017] Added "eXIf" to "chunks_to_ignore[]" in png_set_keep_unknown_chunks(). + Added huge_IDAT.png and empty_ancillary_chunks.png to testpngs/crashers. + Make pngtest --strict, --relax, --xfail options imply -m (multiple). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index ca4a11046..21d90d21e 100644 --- a/CHANGES +++ b/CHANGES @@ -5965,6 +5965,8 @@ Version 1.6.32beta10 [August 5, 2017] Version 1.6.32beta11 [August 5, 2017] Added "eXIf" to "chunks_to_ignore[]" in png_set_keep_unknown_chunks(). + Added huge_IDAT.png and empty_ancillary_chunks.png to testpngs/crashers. + Make pngtest --strict, --relax, --xfail options imply -m (multiple). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/contrib/testpngs/crashers/empty_ancillary_chunks.png b/contrib/testpngs/crashers/empty_ancillary_chunks.png new file mode 100644 index 0000000000000000000000000000000000000000..40572a299a1bc0c72df10d473f4fab9b22fd2890 GIT binary patch literal 694 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga3`ySZE=;=j{(;!Z9znj}_C*$f z*r^eoX{Rcuvw+y?j=qkY9&VQhu`@h_Lt=S#kAm2l&dvc#J0uF8WG!%a7KmNq8c{OM>1ZpM?dj|K)A-hT5W5O!Z+2z%MOPCjJtboFyt=akR{01&~un*aa+ literal 0 HcmV?d00001 diff --git a/pngtest.c b/pngtest.c index 3821e539c..d999e4de2 100644 --- a/pngtest.c +++ b/pngtest.c @@ -1207,7 +1207,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) if (png_get_eXIf_1(read_ptr, read_info_ptr, &exif_length, &exif) != 0) { if (exif_length > 1) - printf(" eXIf type %c%c, %lu bytes\n",exif[0],exif[1], + fprintf(STDERR," eXIf type %c%c, %lu bytes\n",exif[0],exif[1], (unsigned long)exif_length); # ifdef PNG_WRITE_eXIf_SUPPORTED png_set_eXIf_1(write_ptr, write_info_ptr, exif_length, exif); @@ -1325,10 +1325,10 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) { int i; - printf("\n"); + fprintf(STDERR,"\n"); for (i=0; i 1) - printf(" eXIf type %c%c, %lu bytes\n",exif[0],exif[1], + fprintf(STDERR," eXIf type %c%c, %lu bytes\n",exif[0],exif[1], (unsigned long)exif_length); # ifdef PNG_WRITE_eXIf_SUPPORTED png_set_eXIf_1(write_ptr, write_end_info_ptr, exif_length, exif); @@ -1888,6 +1888,7 @@ main(int argc, char *argv[]) inname = argv[2]; strict++; relaxed = 0; + multiple=1; } else if (strcmp(argv[1], "--relaxed") == 0) @@ -1897,6 +1898,7 @@ main(int argc, char *argv[]) inname = argv[2]; strict = 0; relaxed++; + multiple=1; } else if (strcmp(argv[1], "--xfail") == 0) { @@ -1906,6 +1908,7 @@ main(int argc, char *argv[]) strict = 0; xfail++; relaxed++; + multiple=1; } else diff --git a/tests/pngtest-badpngs b/tests/pngtest-badpngs index 85107b78c..649682419 100755 --- a/tests/pngtest-badpngs +++ b/tests/pngtest-badpngs @@ -6,5 +6,6 @@ ./pngtest --relaxed ${srcdir}/contrib/testpngs/crashers/badcrc.png ./pngtest --relaxed ${srcdir}/contrib/testpngs/crashers/badadler.png ./pngtest --xfail ${srcdir}/contrib/testpngs/crashers/bad_iccp.png +./pngtest --xfail ${srcdir}/contrib/testpngs/crashers/empty_ancillary_chunks.png exec ./pngtest --xfail ${srcdir}/contrib/testpngs/crashers/huge_idat.png