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:
@@ -15,6 +15,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
ndpi_murmur_hash((const char *)data, size);
|
||||
ndpi_quick_hash(data, size);
|
||||
|
||||
if(size >= 16)
|
||||
ndpi_quick_16_byte_hash(data);
|
||||
|
||||
str = ndpi_malloc(size + 1);
|
||||
if(str) {
|
||||
memcpy(str, data, size);
|
||||
|
||||
Reference in New Issue
Block a user