* configure.ac: Remove AC_PROG_CXX
* fuzz/Makefile.am: Amend *_SOURCES for .c fuzzer targets,
Remove non-portable EXTRA_DIST wildcards,
Add dist-hook to include fuzzer target files,
Add oss-fuzz make target.
* fuzz/fuzzer.h: New file
* fuzz/*cc: Rename to C, include fuzzer.h
* fuzz/main.c: Include fuzzer.h
* fuzz/run-clang.sh: Build and run fuzzer targets made with clang/libFuzzer
* cfg.mk: Exclude *.repro/* from syntax-check
* fuzz/Makefile.am: Add *.repro/* to EXTRA_DIST
* fuzz/libwget_metalink_parse_fuzzer.repro/clusterfuzz-testcase-minimized-5103826937839616:
Reproducer for OSS-Fuzz issue #1915
* fuzz/libwget_xml_parse_buffer_fuzzer.repro/clusterfuzz-testcase-minimized-4704516446355456:
Reproducer for OSS-Fuzz issue #2041
* fuzz/main.c: Scan and test all files from *.repro/
* Makefile.am: Add 'fuzz' directory to SUBDIRS,
tune 'fuzz-coverage' make target,
print info on how to view coverage report.
* configure.ac: Add AC_PROG_CXX for C++ code in fuzz/
* fuzz/Makefile: Removed
* fuzz/Makefile.am: New file
* fuzz/libwget_bar_fuzzer.cc: Fix memleak
* fuzz/main.c: Add code for unit testing
The OSS-Fuzz targets will now be taken for unit testing as well.
That is, they will be tested by 'make check' including our sanitizer
and valgrind checks. The fuzz tests will be run once with each test
corpus from the corresponding '.in' directory.
A 'make fuzz-coverage' generates a coverage report for running all
fuzz targets against their corpora.
* Makefile.am: Add target 'fuzz-coverage' to generate a coverage
report for fuzz targets.
* fuzz/Makefile: Add target 'fuzz-coverage'
* fuzz/coverage.sh: New script to call a fuzz target with each corpus.
* fuzz/libwget_metalink_parse_fuzzer.cc: Add check for max input length.
* fuzz/libwget_xml_parse_buffer_fuzzer.cc: Likewise
* fuzz/libwget_robots_parse_fuzzer.cc: Add comment
* fuzz/libwget_robots_parse_fuzzer.in/user_agent2: Amend for max coverage
* fuzz/main.c: selfmade __AFL_LOOP() returns 0 after first invocation.
* fuzz/libwget_memtohex.in: Rename to fuzz/libwget_memtohex_fuzzer.in
* fuzz/libwget_metalink_parse.in: Rename to fuzz/libwget_metalink_parse_fuzzer.in
* fuzz/libwget_robots_parse.in: Rename to fuzz/libwget_robots_parse_fuzzer.in
* fuzz/libwget_xml_parse_buffer.in: Rename to fuzz/libwget_xml_parse_buffer_fuzzer.in
* fuzz/libwget_xml_parse_buffer.options: Removed
* fuzz/libwget_metalink_parse_fuzzer.options: Removed
* fuzz/*_fuzzer.cc: Use malloc() instead of stack memory to help
sanitizers.
* fuzz/libwget_robots_parse.in/user_agent1: Increase code coverage.
* fuzz/main.c: define __AFL_LOOP() is not already defined.
* fuzz/libwget_metalink_parse.options: New file
* fuzz/libwget_xml_parse_buffer.options: New file
Max input len is 64 for OSS-Fuzz, we need larger input for
some fuzz targets.
* fuzz/*: New files
README.md contains instructions how to build and run single fuzzers.
Currently we have fuzzers and corpora for
- wget_memtohex()
- wget_metalink_parse()
- wget_robots_parse()
- wget_xml_parse_buffer()
* fuzz/libwget_bar.in/123456: New file