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:
Ivan Nardi
2023-11-07 17:46:29 +01:00
committed by GitHub
parent 58a9e2d967
commit b539b0d090
9 changed files with 83 additions and 133 deletions
+2
View File
@@ -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;