diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2023-01-20 14:27:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-20 14:27:33 +0100 |
commit | 5e8c1ebbb7f67033916ed4878cd6c2a662073898 (patch) | |
tree | f538977aa08015bffcf99ec9f6bb505c9143232c /fuzz/fuzz_common_code.h | |
parent | 496b284c9888c090696cc8e570d0b20c08dc3d63 (diff) |
fuzz: fix memory allocation failure logic (#1867)
We *do* want to have some allocation errors.
Fix some related bugs
Fix: 29be01ef
Diffstat (limited to 'fuzz/fuzz_common_code.h')
-rw-r--r-- | fuzz/fuzz_common_code.h | 11 |
1 files changed, 5 insertions, 6 deletions
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 |