about summary refs log tree commit diff
path: root/custom_mutators/examples/example.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2023-02-23 11:49:28 +0100
committerGitHub <noreply@github.com>2023-02-23 11:49:28 +0100
commiteb5c1ee4f3ffd6e42a3637082ab4ea089052ad8b (patch)
treeb0ebfc066252a9c78dfe90cf811b2b27f43cc215 /custom_mutators/examples/example.c
parenta293281b9bbb4e61bfbe5e67ab108d9e5ee40192 (diff)
parenteeccb2da69d7e6f32ee74c431e7c5053e8379dff (diff)
downloadafl++-eb5c1ee4f3ffd6e42a3637082ab4ea089052ad8b.tar.gz
Merge pull request #1650 from AFLplusplus/autotoken
Autotoken
Diffstat (limited to 'custom_mutators/examples/example.c')
-rw-r--r--custom_mutators/examples/example.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/custom_mutators/examples/example.c b/custom_mutators/examples/example.c
index 3f299508..e680ec8e 100644
--- a/custom_mutators/examples/example.c
+++ b/custom_mutators/examples/example.c
@@ -6,7 +6,7 @@
              Dominik Maier <mail@dmnk.co>
 */
 
-// You need to use -I /path/to/AFLplusplus/include
+// You need to use -I/path/to/AFLplusplus/include -I.
 #include "custom_mutator_helpers.h"
 
 #include <stdint.h>
@@ -118,6 +118,8 @@ size_t afl_custom_fuzz(my_mutator_t *data, uint8_t *buf, size_t buf_size,
 
   }
 
+  if (max_size > mutated_size) { mutated_size = max_size; }
+
   *out_buf = mutated_out;
   return mutated_size;