mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
Merge pull request #6775 from radarhere/oss-fuzz
fix https://github.com/google/oss-fuzz/issues/9086
This commit is contained in:
commit
823e6e69e6
|
@ -19,9 +19,7 @@ python3 setup.py build --build-base=/tmp/build install
|
||||||
|
|
||||||
# Build fuzzers in $OUT.
|
# Build fuzzers in $OUT.
|
||||||
for fuzzer in $(find $SRC -name 'fuzz_*.py'); do
|
for fuzzer in $(find $SRC -name 'fuzz_*.py'); do
|
||||||
fuzzer_basename=$(basename -s .py $fuzzer)
|
compile_python_fuzzer $fuzzer \
|
||||||
fuzzer_package=${fuzzer_basename}.pkg
|
|
||||||
pyinstaller \
|
|
||||||
--add-binary /usr/local/lib/libjpeg.so.62.3.0:. \
|
--add-binary /usr/local/lib/libjpeg.so.62.3.0:. \
|
||||||
--add-binary /usr/local/lib/libfreetype.so.6:. \
|
--add-binary /usr/local/lib/libfreetype.so.6:. \
|
||||||
--add-binary /usr/local/lib/liblcms2.so.2:. \
|
--add-binary /usr/local/lib/liblcms2.so.2:. \
|
||||||
|
@ -31,17 +29,7 @@ for fuzzer in $(find $SRC -name 'fuzz_*.py'); do
|
||||||
--add-binary /usr/local/lib/libwebp.so.7:. \
|
--add-binary /usr/local/lib/libwebp.so.7:. \
|
||||||
--add-binary /usr/local/lib/libwebpdemux.so.2:. \
|
--add-binary /usr/local/lib/libwebpdemux.so.2:. \
|
||||||
--add-binary /usr/local/lib/libwebpmux.so.3:. \
|
--add-binary /usr/local/lib/libwebpmux.so.3:. \
|
||||||
--add-binary /usr/local/lib/libxcb.so.1:. \
|
--add-binary /usr/local/lib/libxcb.so.1:.
|
||||||
--distpath $OUT --onefile --name $fuzzer_package $fuzzer
|
|
||||||
|
|
||||||
# Create execution wrapper.
|
|
||||||
echo "#!/bin/sh
|
|
||||||
# LLVMFuzzerTestOneInput for fuzzer detection.
|
|
||||||
this_dir=\$(dirname \"\$0\")
|
|
||||||
LD_PRELOAD=\$this_dir/sanitizer_with_fuzzer.so \
|
|
||||||
ASAN_OPTIONS=\$ASAN_OPTIONS:symbolize=1:external_symbolizer_path=\$this_dir/llvm-symbolizer:detect_leaks=0 \
|
|
||||||
\$this_dir/$fuzzer_package \$@" > $OUT/$fuzzer_basename
|
|
||||||
chmod u+x $OUT/$fuzzer_basename
|
|
||||||
done
|
done
|
||||||
|
|
||||||
find Tests/images Tests/icc -print | zip -q $OUT/fuzz_pillow_seed_corpus.zip -@
|
find Tests/images Tests/icc -print | zip -q $OUT/fuzz_pillow_seed_corpus.zip -@
|
||||||
|
|
Loading…
Reference in New Issue
Block a user