fuzz: improve coverage and remove dead code (#2135)
We are not able to remove custom rules: remove the empty stubs (which originate from the original OpenDPI code). `ndpi_guess_protocol_id()` is only called on the first packet of the flow, so the bitmask `flow->excluded_protocol_bitmask` is always empty, since we didn't call any dissectors yet. Move another hash function to the dedicated source file.
This commit is contained in:
@@ -57,6 +57,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
ndpi_hash_find_entry(h, value_added.data(), value_added.size(), &value);
|
||||
}
|
||||
|
||||
if (fuzzed_data.ConsumeBool())
|
||||
ndpi_hash_free(NULL, cleanup_func);
|
||||
ndpi_hash_free(&h, cleanup_func);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user