about summary refs log tree commit diff
path: root/examples/custom_mutators/post_library_png.so.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-11-18 21:25:35 +0100
committerGitHub <noreply@github.com>2020-11-18 21:25:35 +0100
commit4d9eb9bda147a26fc8cbe885b6193cf0c94c6314 (patch)
treec7a903633c7d1b0b5e373535188fd3a458a7f329 /examples/custom_mutators/post_library_png.so.c
parent4c59c5234aec0469e4dd02561dbd84387bd53155 (diff)
parentcd0a25be5e9b05a2ab6a11592cd95e7f653bf42d (diff)
downloadafl++-4d9eb9bda147a26fc8cbe885b6193cf0c94c6314.tar.gz
Merge pull request #607 from AFLplusplus/dev
push to stable
Diffstat (limited to 'examples/custom_mutators/post_library_png.so.c')
-rw-r--r--examples/custom_mutators/post_library_png.so.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/custom_mutators/post_library_png.so.c b/examples/custom_mutators/post_library_png.so.c
index 7c1ea93e..941f7e55 100644
--- a/examples/custom_mutators/post_library_png.so.c
+++ b/examples/custom_mutators/post_library_png.so.c
@@ -54,7 +54,13 @@ void *afl_custom_init(void *afl) {
   }
 
   state->buf = calloc(sizeof(unsigned char), 4096);
-  if (!state->buf) { return NULL; }
+  if (!state->buf) {
+
+    free(state);
+    perror("calloc");
+    return NULL;
+
+  }
 
   return state;