pnggroup / libpng

LIBPNG: Portable Network Graphics support, official libpng repository
http://libpng.sf.net
Other
1.25k stars 611 forks source link

Need to restore STDERR in pngtest.c #560

Open bungeman opened 4 months ago

bungeman commented 4 months ago

In test: Add consistency checks for the PNG_LIBPNG_VER* number the STDERR macro was moved from outside an #ifdef to inside an #ifdef. This broke the code in the else of this #ifdef which also uses the STDERR macro. It appears the #define STDERR should be moved back to where it was to avoid compile errors in the #else case.

This can be reproduced by making a change similar to what the oss-fuzz build currently does setting option WRITE disabled and then building.

jbowler commented 3 months ago

The modification in the second link in the original report is completely bogus; scripts/pnglibconf.dfa should never be modified! It's part of the source code. Attempting to claim a bug on the basis of a modification to the source code just doesn't work.

jbowler commented 3 weeks ago

@ctruta: here's the repro. In the source tree:

mkdir test
cd test
../configure
DFA_XTRA=../contrib/conftest/simple.dfa make pnglibconf.h
make -j
make check

This fails with the reported error. With cmake just copy simple.dfa on top of pngusr.dfa and do make -j

The bug exists in 1.6.43 which makes it a serious bug; it prevents running the check programs on a minconfig build.

jbowler commented 3 days ago

@ctruta: this is a major bug, the most significant bug, in 1.6.43