about summary refs log tree commit diff
path: root/examples/custom_mutators/example.c
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2020-03-06 21:23:54 +0100
committerAndrea Fioraldi <andreafioraldi@gmail.com>2020-03-06 21:23:54 +0100
commit2287534ec6dd68b06a5052caa4ab3305d15861ec (patch)
treeeef5536d834457fa942e1417556f0ff0f6503653 /examples/custom_mutators/example.c
parent27d6d358934a1eaf0511ff4eedf93fe99034020a (diff)
parent13429d204d71ec1eef4b6b546e4739e9f2a9e869 (diff)
downloadafl++-2287534ec6dd68b06a5052caa4ab3305d15861ec.tar.gz
Merge branch 'master' of github.com:vanhauser-thc/AFLplusplus
Diffstat (limited to 'examples/custom_mutators/example.c')
-rw-r--r--examples/custom_mutators/example.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/custom_mutators/example.c b/examples/custom_mutators/example.c
index 63e4d6da..63201e23 100644
--- a/examples/custom_mutators/example.c
+++ b/examples/custom_mutators/example.c
@@ -53,7 +53,7 @@ size_t afl_custom_fuzz(uint8_t *buf, size_t buf_size,
   // Mutate the payload of the packet
   for (int i = 3; i < mutated_size; i++) {
 
-    mutated_out[i] = (data[i] + rand() % 10) & 0xff;
+    mutated_out[i] = (buf[i] + rand() % 10) & 0xff;
 
   }
 
@@ -90,7 +90,7 @@ size_t afl_custom_pre_save(uint8_t *buf, size_t buf_size, uint8_t **out_buf) {
 }
 
 uint8_t *trim_buf;
-size_t trim_buf_size
+size_t trim_buf_size;
 int trimmming_steps;
 int cur_step;