Fix/improve fuzzing (#2426)
This commit is contained in:
@@ -774,6 +774,7 @@ distdir:
|
||||
-o -name '*.cpp' \
|
||||
-o -name '*.options' \
|
||||
-o -name 'ipv4_addresses.txt' \
|
||||
-o -name 'ipv6_addresses.txt' \
|
||||
-o -name 'bd_param.txt' \
|
||||
-o -name 'splt_param.txt' \
|
||||
-o -name 'random_list.list' \
|
||||
|
||||
@@ -49,6 +49,12 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
}
|
||||
}
|
||||
|
||||
/* Some higher level functions */
|
||||
ndpi_load_ipv4_ptree_file(t, "ipv4_addresses.txt", NDPI_PROTOCOL_TLS);
|
||||
ndpi_load_ipv4_ptree_file(t, "invalid_filename", NDPI_PROTOCOL_TLS);
|
||||
ndpi_load_ipv6_ptree_file(t, "ipv6_addresses.txt", NDPI_PROTOCOL_TLS);
|
||||
ndpi_load_ipv6_ptree_file(t, "invalid_filename", NDPI_PROTOCOL_TLS);
|
||||
|
||||
/* Random search */
|
||||
num_iteration = fuzzed_data.ConsumeIntegral<u_int8_t>();
|
||||
for (i = 0; i < num_iteration; i++) {
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#Random list of ipv6 addresses
|
||||
|
||||
2001:db8:3333:4444:5555:6666:7777:8888
|
||||
2001:a:b:c::/64
|
||||
ff06::c3
|
||||
Reference in New Issue
Block a user