about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2022-08-19 13:17:01 +0200
committervanhauser-thc <vh@thc.org>2022-08-19 13:17:01 +0200
commitb4cb3784a5135703444357876c62d19be4a58862 (patch)
tree01553b6f26b42dda6d5694d2219ae28b72c20e79 /src
parent7b2145b914ba3c8443437c68ae29458d832b1e35 (diff)
downloadafl++-b4cb3784a5135703444357876c62d19be4a58862.tar.gz
add malloc check
Diffstat (limited to 'src')
-rw-r--r--src/afl-cc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c
index 4c377ad1..ffd15476 100644
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -316,6 +316,8 @@ void parse_fsanitize(char *string) {
   char *new = malloc(strlen(string) + 1);
   char *tmp = malloc(strlen(ptr));
   u32   count = 0, len, ende = 0;
+
+  if (!new || !tmp) { FATAL("could not aquire memory"); }
   strcpy(new, "-fsanitize=");
 
   do {