mirror of https://github.com/xiph/flac
Update fuzzers
This changes the names of the two fuzzers so they align with current oss-fuzz usage (to provide continuity in test data and corpora) and adds a dictionary to the decoder fuzzer. It also removes some unnecessary configuration, as it clashed with oss-fuzz defaults
This commit is contained in:
parent
b48ed95fcb
commit
0f98b940f8
|
@ -75,8 +75,8 @@ test/picture.diff
|
|||
test/picture.log
|
||||
.dirstamp
|
||||
microbench/benchmark_residual
|
||||
oss-fuzz/fuzz-decoder
|
||||
oss-fuzz/fuzz-encoder
|
||||
oss-fuzz/fuzzer_decoder
|
||||
oss-fuzz/fuzzer_encoder
|
||||
|
||||
/*[Bb]uild*/
|
||||
/out/
|
||||
|
|
|
@ -382,15 +382,13 @@ if test "x$have_oss_fuzzers" = "xyes"; then
|
|||
else
|
||||
AM_CONDITIONAL([USE_OSSFUZZERS], [test "false" = "true"])
|
||||
# Disable fuzzer if the compiler is not Clang.
|
||||
AC_MSG_WARN([*** Ozz-Fuzz is disabled because that requres the Clang compiler.])
|
||||
have_oss_fuzzers="no (compiler is GCC)"
|
||||
AC_MSG_WARN([*** Ozz-Fuzz is disabled because that requires the Clang compiler.])
|
||||
have_oss_fuzzers="no (compiler is not Clang)"
|
||||
fi
|
||||
else
|
||||
AM_CONDITIONAL([USE_OSSFUZZERS], [test "false" = "true"])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([USE_OSSFUZZ_FLAG], [test "x$LIB_FUZZING_ENGINE" = "x-fsanitize=fuzzer"])
|
||||
AM_CONDITIONAL([USE_OSSFUZZ_STATIC], [test -f "$LIB_FUZZING_ENGINE"])
|
||||
AC_SUBST([LIB_FUZZING_ENGINE])
|
||||
|
||||
dnl check for ogg library
|
||||
|
|
|
@ -20,7 +20,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/oss-fuzz
|
|||
AM_CXXFLAGS = -std=c++11
|
||||
|
||||
EXTRA_DIST = \
|
||||
fuzz-encoder.dict \
|
||||
fuzzer_encoder.dict \
|
||||
fuzzing/Readme.md \
|
||||
fuzzing/datasource/datasource.hpp \
|
||||
fuzzing/datasource/id.hpp \
|
||||
|
@ -28,31 +28,21 @@ EXTRA_DIST = \
|
|||
fuzzing/memory.hpp \
|
||||
fuzzing/types.hpp
|
||||
|
||||
if USE_OSSFUZZ_FLAG
|
||||
FUZZ_FLAG = $(LIB_FUZZING_ENGINE)
|
||||
FUZZ_LDADD = -lFuzzer
|
||||
else
|
||||
if USE_OSSFUZZ_STATIC
|
||||
FUZZ_LDADD = $(LIB_FUZZING_ENGINE)
|
||||
FUZZ_FLAG = -lFuzzer
|
||||
endif
|
||||
endif
|
||||
|
||||
noinst_PROGRAMS =
|
||||
|
||||
if USE_OSSFUZZERS
|
||||
noinst_PROGRAMS += fuzz-decoder fuzz-encoder
|
||||
noinst_PROGRAMS += fuzzer_encoder fuzzer_decoder
|
||||
endif
|
||||
|
||||
fuzz_decoder_SOURCES = fuzz-decoder.cc
|
||||
fuzz_decoder_CXXFLAGS = $(AM_CXXFLAGS) $(FUZZ_FLAG)
|
||||
fuzz_decoder_LDFLAGS = $(AM_LDFLAGS) -static
|
||||
fuzz_decoder_LDADD = $(flac_libs) $(FUZZ_LDADD)
|
||||
fuzzer_encoder_SOURCES = fuzzer_encoder.cc
|
||||
fuzzer_encoder_CXXFLAGS = $(AM_CXXFLAGS) $(LIB_FUZZING_ENGINE)
|
||||
fuzzer_encoder_LDFLAGS = $(AM_LDFLAGS)
|
||||
fuzzer_encoder_LDADD = $(flac_libs)
|
||||
|
||||
fuzz_encoder_SOURCES = fuzz-encoder.cc
|
||||
fuzz_encoder_CXXFLAGS = $(AM_CXXFLAGS) $(FUZZ_FLAG)
|
||||
fuzz_encoder_LDFLAGS = $(AM_LDFLAGS) -static
|
||||
fuzz_encoder_LDADD = $(flac_libs) $(FUZZ_LDADD)
|
||||
fuzzer_decoder_SOURCES = fuzzer_decoder.cc
|
||||
fuzzer_decoder_CXXFLAGS = $(AM_CXXFLAGS) $(LIB_FUZZING_ENGINE)
|
||||
fuzzer_decoder_LDFLAGS = $(AM_LDFLAGS)
|
||||
fuzzer_decoder_LDADD = $(flac_libs)
|
||||
|
||||
flac_libs = \
|
||||
$(top_builddir)/src/libFLAC/libFLAC-static.la \
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
flac_stream_marker="fLaC"
|
||||
ogg_stream_marker="OggS"
|
||||
flac_in_ogg_marker="\x7fFLAC"
|
||||
|
||||
synccode_fixed_blocksize="\xFF\xF8"
|
||||
synccode_variable_blocksize="\xFF\xF9"
|
Loading…
Reference in New Issue