Skip to content
Permalink
Browse files

oop deleted one png init too many

  • Loading branch information...
jcupitt committed Oct 7, 2019
1 parent fef3dae commit 3510c515f2294578a4808034655ab1042ab7363a
Showing with 15 additions and 3 deletions.
  1. +6 −1 fuzz/test_fuzz.sh
  2. +4 −1 libvips/foreign/vipspng.c
  3. +1 −1 test/test_descriptors
  4. +4 −0 test/test_descriptors.sh
@@ -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
@@ -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 );
@@ -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
@@ -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

0 comments on commit 3510c51

Please sign in to comment.
You can’t perform that action at this time.