mirror of https://github.com/google/oss-fuzz.git
[FFmpeg] Add fuzzers for individual demuxers (#4529)
This should improve coverage of libavformat
This commit is contained in:
parent
f0a3de78ff
commit
2cd2ee63d7
|
@ -198,6 +198,44 @@ fuzzer_name=ffmpeg_IO_DEMUXER_fuzzer
|
||||||
make tools/target_io_dem_fuzzer
|
make tools/target_io_dem_fuzzer
|
||||||
mv tools/target_io_dem_fuzzer $OUT/${fuzzer_name}
|
mv tools/target_io_dem_fuzzer $OUT/${fuzzer_name}
|
||||||
|
|
||||||
|
#Build fuzzers for individual demuxers
|
||||||
|
PKG_CONFIG_PATH="$FFMPEG_DEPS_PATH/lib/pkgconfig" ./configure \
|
||||||
|
--cc=$CC --cxx=$CXX --ld="$CXX $CXXFLAGS -std=c++11" \
|
||||||
|
--extra-cflags="-I$FFMPEG_DEPS_PATH/include" \
|
||||||
|
--extra-ldflags="-L$FFMPEG_DEPS_PATH/lib" \
|
||||||
|
--prefix="$FFMPEG_DEPS_PATH" \
|
||||||
|
--pkg-config-flags="--static" \
|
||||||
|
--enable-ossfuzz \
|
||||||
|
--libfuzzer=$LIB_FUZZING_ENGINE \
|
||||||
|
--optflags=-O1 \
|
||||||
|
--enable-gpl \
|
||||||
|
--disable-muxers \
|
||||||
|
--disable-protocols \
|
||||||
|
--disable-devices \
|
||||||
|
--disable-shared \
|
||||||
|
--disable-encoders \
|
||||||
|
--disable-filters \
|
||||||
|
--disable-muxers \
|
||||||
|
--disable-parsers \
|
||||||
|
--disable-decoders \
|
||||||
|
--disable-hwaccels \
|
||||||
|
--disable-bsfs \
|
||||||
|
--disable-vaapi \
|
||||||
|
--disable-vdpau \
|
||||||
|
--disable-crystalhd \
|
||||||
|
--disable-v4l2_m2m \
|
||||||
|
--disable-cuda_llvm \
|
||||||
|
--enable-demuxers \
|
||||||
|
--disable-demuxer=rtp,rtsp,sdp \
|
||||||
|
|
||||||
|
CONDITIONALS=`grep 'DEMUXER 1$' config.h | sed 's/#define CONFIG_\(.*\)_DEMUXER 1/\1/'`
|
||||||
|
for c in $CONDITIONALS ; do
|
||||||
|
fuzzer_name=ffmpeg_dem_${c}_fuzzer
|
||||||
|
symbol=`echo $c | sed "s/.*/\L\0/"`
|
||||||
|
make tools/target_dem_${symbol}_fuzzer
|
||||||
|
mv tools/target_dem_${symbol}_fuzzer $OUT/${fuzzer_name}
|
||||||
|
done
|
||||||
|
|
||||||
# Find relevant corpus in test samples and archive them for every fuzzer.
|
# Find relevant corpus in test samples and archive them for every fuzzer.
|
||||||
#cd $SRC
|
#cd $SRC
|
||||||
#python group_seed_corpus.py $TEST_SAMPLES_PATH $OUT/
|
#python group_seed_corpus.py $TEST_SAMPLES_PATH $OUT/
|
||||||
|
|
Loading…
Reference in New Issue