[libpng] Added huge_IDAT.png and empty_ancillary_chunks.png to testpngs/crashers

Make pngtest --strict, --relax, --xfail options imply -m (multiple).
This commit is contained in:
Glenn Randers-Pehrson 2017-08-05 11:01:18 -05:00
parent 0ec733ce61
commit c33d624988
5 changed files with 14 additions and 6 deletions

View File

@ -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

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

View File

@ -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<num_text; i++)
{
printf(" Text compression[%d]=%d\n",
fprintf(STDERR," Text compression[%d]=%d\n",
i, text_ptr[i].compression);
}
}
@ -1545,10 +1545,10 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
{
int i;
printf("\n");
fprintf(STDERR,"\n");
for (i=0; i<num_text; i++)
{
printf(" Text compression[%d]=%d\n",
fprintf(STDERR," Text compression[%d]=%d\n",
i, text_ptr[i].compression);
}
}
@ -1565,7 +1565,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
if (png_get_eXIf_1(read_ptr, end_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_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

View File

@ -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