fuzz: improve fuzzing coverage (#2474)

Remove some code never triggered

AFP: the removed check is included in the following one
MQTT: fix flags extraction
This commit is contained in:
Ivan Nardi
2024-06-17 13:45:47 +02:00
committed by GitHub
parent a35fae6b75
commit 26cc1f131f
19 changed files with 97 additions and 66 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
num_iteration = fuzzed_data.ConsumeIntegral<u_int8_t>();
for (i = 0; i < num_iteration; i++) {
value = fuzzed_data.ConsumeBytesAsString(fuzzed_data.ConsumeIntegral<u_int8_t>());
ndpi_domain_classify_hostname(ndpi_struct, d, &class_id, (char *)value.c_str());
ndpi_domain_classify_hostname(fuzzed_data.ConsumeBool() ? ndpi_struct : NULL, d, &class_id, (char *)value.c_str());
}
/* Search of an added entry */