aboutsummaryrefslogtreecommitdiff
path: root/fuzz/fuzz_ds_ptree.cpp
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2024-05-08 11:46:02 +0200
committerGitHub <noreply@github.com>2024-05-08 11:46:02 +0200
commit7c6910d9e5d5b08a164a22db5db9969e20cbc232 (patch)
tree10d14965407a8f8bc0cf4d53d6a01357b596b88c /fuzz/fuzz_ds_ptree.cpp
parente9dc035c5ca8e8e9012c76d5e2bdb9c085d6664a (diff)
Fix/improve fuzzing (#2426)
Diffstat (limited to 'fuzz/fuzz_ds_ptree.cpp')
-rw-r--r--fuzz/fuzz_ds_ptree.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/fuzz/fuzz_ds_ptree.cpp b/fuzz/fuzz_ds_ptree.cpp
index d8a055c3b..6659fccc8 100644
--- a/fuzz/fuzz_ds_ptree.cpp
+++ b/fuzz/fuzz_ds_ptree.cpp
@@ -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++) {