From 458b658eec4ec3621d70a718363490d1d3edd18e Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Mon, 16 Jun 2025 20:22:45 +0200 Subject: Prelimary work to remove `NDPI_LAST_IMPLEMENTED_PROTOCOL` (#2885) --- fuzz/fuzz_readerutils_parseprotolist.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'fuzz/fuzz_readerutils_parseprotolist.cpp') diff --git a/fuzz/fuzz_readerutils_parseprotolist.cpp b/fuzz/fuzz_readerutils_parseprotolist.cpp index fcc84d5e3..1756bb30a 100644 --- a/fuzz/fuzz_readerutils_parseprotolist.cpp +++ b/fuzz/fuzz_readerutils_parseprotolist.cpp @@ -22,7 +22,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { struct ndpi_bitmask bitmask; char *str; - ndpi_bitmask_alloc(&bitmask, ndpi_get_num_internal_protocols()); /* Don't make this call to fail...*/ + /* Don't make the next function to fail...*/ + fuzz_set_alloc_callbacks_and_seed(0); + + ndpi_bitmask_alloc(&bitmask, ndpi_get_num_internal_protocols()); /* To allow memory allocation failures */ fuzz_set_alloc_callbacks_and_seed(size); -- cgit v1.2.3