aboutsummaryrefslogtreecommitdiff
path: root/fuzz/fuzz_readerutils_parseprotolist.cpp
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2025-06-16 20:22:45 +0200
committerGitHub <noreply@github.com>2025-06-16 20:22:45 +0200
commit458b658eec4ec3621d70a718363490d1d3edd18e (patch)
tree21f11bb6c78d511978645aa7bf327f90ff1a5f2d /fuzz/fuzz_readerutils_parseprotolist.cpp
parent92302abfa896c27955812bbe250d96021bc02e88 (diff)
Prelimary work to remove `NDPI_LAST_IMPLEMENTED_PROTOCOL` (#2885)
Diffstat (limited to 'fuzz/fuzz_readerutils_parseprotolist.cpp')
-rw-r--r--fuzz/fuzz_readerutils_parseprotolist.cpp5
1 files changed, 4 insertions, 1 deletions
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);