Skip to content

Add wget_options_fuzzer

Tim Rühsen requested to merge tmp-wget-options-fuzzer into master
  • Makefile.am: Fix make target 'fuzz-coverage'
  • configure.ac: Enable building static library by default, add option --enable-fuzzing
  • fuzz/Makefile.am: Add wget_options_fuzzer, check for FUZZING (set with --enable-fuzzing)
  • fuzz/README.md: Amend the text
  • fuzz/main.c: Use printf() instead of wget_info_printf()
  • fuzz/run-clang.sh: Use fuzzer binaries built by 'make'
  • fuzz/wget_options_fuzzer.c: New fuzzer
  • fuzz/wget_options_fuzzer.dict: New fuzzer dictionary
  • fuzz/wget_options_fuzzer.in/*: Initial fuzz corpora
  • libwget/net.c: Skip IP address resolution when fuzzing
  • src/log.c: Don't create files when fuzzing, don't print to console when fuzzing
  • src/options.c: Add set_exit_status() and get_exit_status(), don't print --help / --version to console when fuzzing, do not call exit() - return error instead, fix recursion level in _read_config(), don't create files when fuzzing, fix memory leaks in deinit()
  • src/stats.c: Don't create files when fuzzing
  • src/wget.c: Remove set_exit_status()
  • src/wget_main.h: Remove exit_status_t
  • src/wget_options.h: Add exit_status_t
  • tests/test-plugin.c: Fix expected exit codes from 1 to 2

This is for application fuzzing (namely code from src/). The code in src/ had to be prepared in certain ways, but it doesn't add significant overhead, even makes the code cleaner in some ways. Several of these changes have already been committed into the master branch.

Merge request reports