From 2b922e9e684b51c04c7311ed6fca1334b43b54f6 Mon Sep 17 00:00:00 2001 From: hexcoder- Date: Fri, 15 May 2020 17:07:30 +0200 Subject: fix possible null ptr deref in afl-prealloc.h --- include/afl-prealloc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/afl-prealloc.h') diff --git a/include/afl-prealloc.h b/include/afl-prealloc.h index 66e6aadf..5e5d7b85 100644 --- a/include/afl-prealloc.h +++ b/include/afl-prealloc.h @@ -61,6 +61,7 @@ typedef enum prealloc_status { if ((prealloc_counter) >= (prealloc_size)) { \ \ 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; \ \ } else { \ -- cgit 1.4.1