diff options
author | Peter Wu <peter@lekensteyn.nl> | 2018-10-21 13:14:44 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2018-10-21 11:47:52 +0000 |
commit | 1957673703fb5e5865bfc4412393e20302569392 (patch) | |
tree | 2f447d89646ce71d5331b8912d881956419d4f00 /fuzz | |
parent | 9f74af24f1c7e37b1dfce9041a71cc2ac2ed89f9 (diff) |
fuzz: Fix assertion failed: (fuzz_handle != NULL) for fuzzshark_ip
If no dissector is defined, the macro should not be defined either.
Change-Id: If9c24d2b223e93f1d42f8a7444fd019aad4c5c1d
Fixes: v2.9.0rc0-2266-g7e88bb5e53 ("fuzzshark: integrate oss-fuzz targets in CMake")
Reviewed-on: https://code.wireshark.org/review/30299
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'fuzz')
-rw-r--r-- | fuzz/CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fuzz/CMakeLists.txt b/fuzz/CMakeLists.txt index c572f90c52..6bc57500e3 100644 --- a/fuzz/CMakeLists.txt +++ b/fuzz/CMakeLists.txt @@ -104,9 +104,12 @@ function(generate_fuzzer dissector_table name) fuzzshark_set_common_options(${fuzzer_name}) target_compile_definitions(${fuzzer_name} PRIVATE FUZZ_DISSECTOR_LIST=${FUZZ_DISABLED_DISSECTORS_MACRO} - FUZZ_DISSECTOR_TABLE="${dissector_table}" FUZZ_DISSECTOR_TARGET="${name}" ) + if(NOT dissector_table STREQUAL "") + target_compile_definitions(${fuzzer_name} PRIVATE + FUZZ_DISSECTOR_TABLE="${dissector_table}") + endif() endfunction() # Add fuzzer targets for every dissector in list FUZZ_<table-var>_DISSECTORS, |