fuzz: fix memory allocation failure logic (#1867)

We *do* want to have some allocation errors.
Fix some related bugs
Fix: 29be01ef
This commit is contained in:
Ivan Nardi
2023-01-20 14:27:33 +01:00
committed by GitHub
parent 496b284c98
commit 5e8c1ebbb7
280 changed files with 161 additions and 124 deletions
+5 -6
View File
@@ -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