oop deleted one png init too many

This commit is contained in:
John Cupitt 2019-10-07 13:30:19 +01:00
parent fef3dae892
commit 3510c515f2
4 changed files with 15 additions and 3 deletions

View File

@ -14,8 +14,13 @@ export VIPS_WARNING=0
ret=0
for fuzzer in *_fuzzer; do
fail=0
find "common_fuzzer_corpus" -type f -not -empty -print0 \
| xargs -0 -n1 "./$fuzzer" || ret=1
| xargs -0 -n1 "./$fuzzer" || fail=1
if [ $fail ]; then
echo FAIL $fuzzer
ret=1
fi
done
exit $ret

View File

@ -208,6 +208,10 @@ read_open_input( Read *read )
return( -1 );
if( read->seek_position != -1 )
fseek( read->fp, read->seek_position, SEEK_SET );
/* Just takes a copy of the fp.
*/
png_init_io( read->pPng, read->fp );
}
return( 0 );
@ -324,7 +328,6 @@ read_new_filename( VipsImage *out, const char *name, gboolean fail )
return( NULL );
}
png_init_io( read->pPng, read->fp );
read_info( read );
return( read );

View File

@ -188,7 +188,7 @@ func_exec_program ()
if test -f "$progdir/$program"; then
# Add our own library path to LD_LIBRARY_PATH
LD_LIBRARY_PATH="/home/john/GIT/libvips/libvips/.libs:/home/john/vips/lib:$LD_LIBRARY_PATH"
LD_LIBRARY_PATH="/home/john/GIT/libvips/libvips/.libs:/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
# Some systems cannot cope with colon-terminated LD_LIBRARY_PATH
# The second colon is a workaround for a bug in BeOS R4 sed

View File

@ -26,3 +26,7 @@ fi
if test_supported pngload; then
./test_descriptors $test_images/sample.png
fi
if test_supported webpload; then
./test_descriptors $test_images/1.webp
fi