libpng
libpng copied to clipboard
pngtest creates output image with incorrect filename in relaxed mode
The testpng example application I believe should take input and output filenames as arguments. However when ran in --relaxed mode outfile argument is ignored:
For example:
alan@fuzz:~$ rm -f pngout.png alan@fuzz:~$ ls | grep -c pngout.png 0 alan@fuzz:~$ ./libpng_afl/pngtest black1x1.png >/dev/null alan@fuzz:~$ ls | grep -c pngout.png 1 alan@fuzz:~$ rm -f pngout.png alan@fuzz:~$ ./libpng_afl/pngtest black1x1.png pngout1.png >/dev/null alan@fuzz:~$ ls | grep -c pngout.png 0 alan@fuzz:~$ ./libpng_afl/pngtest --relaxed black1x1.png pngout1.png >/dev/null alan@fuzz:~$ ls | grep -c pngout.png 1
Expected outcome is outfilename should be honored even in relaxed mode.
It is, in fact, a test program which only works with certain arguments and even then doesn't do anything logical with those arguments. I ran into the same issue myself just a couple of days ago; pngout.png always used to be a correctly formed PNG file, but with --relaxed (which is what the last test in "make check" uses) it is garbage.
pngtest has no function other than to run the very specific tests in "make check". It does that. This is not a bug.