fix possible null ptr deref in afl-prealloc.h

This commit is contained in:
hexcoder- 2020-05-15 17:07:30 +02:00
parent 57637ba0b0
commit 2b922e9e68

View File

@ -61,6 +61,7 @@ typedef enum prealloc_status {
if ((prealloc_counter) >= (prealloc_size)) { \ if ((prealloc_counter) >= (prealloc_size)) { \
\ \
el_ptr = malloc(sizeof(*el_ptr)); \ el_ptr = malloc(sizeof(*el_ptr)); \
if (!el_ptr) { FATAL("error in list.h -> out of memory for element!"); } \
el_ptr->pre_status = PRE_STATUS_MALLOC; \ el_ptr->pre_status = PRE_STATUS_MALLOC; \
\ \
} else { \ } else { \