From 5e8c1ebbb7f67033916ed4878cd6c2a662073898 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Fri, 20 Jan 2023 14:27:33 +0100 Subject: fuzz: fix memory allocation failure logic (#1867) We *do* want to have some allocation errors. Fix some related bugs Fix: 29be01ef --- fuzz/fuzz_common_code.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'fuzz/fuzz_common_code.h') diff --git a/fuzz/fuzz_common_code.h b/fuzz/fuzz_common_code.h index 9f26ea060..84670a0bb 100644 --- a/fuzz/fuzz_common_code.h +++ b/fuzz/fuzz_common_code.h @@ -8,15 +8,14 @@ extern "C" { #endif -#ifdef ENABLE_MEM_ALLOC_FAILURES -void *malloc_wrapper(size_t size); -void free_wrapper(void *freeable); -void set_mem_alloc_state(int value); -#endif - void fuzz_init_detection_module(struct ndpi_detection_module_struct **ndpi_info_mod, int enable_log); +/* To allow memory allocation failures */ +void fuzz_set_alloc_callbacks(void); +void fuzz_set_alloc_seed(int seed); +void fuzz_set_alloc_callbacks_and_seed(int seed); + #ifdef __cplusplus } #endif -- cgit v1.2.3