aboutsummaryrefslogtreecommitdiff
path: root/custom_mutators/examples/example.c
diff options
context:
space:
mode:
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;