diff options
author | Tobias Scharnowski <tobias.scharnowski@rub.de> | 2022-06-10 18:38:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-10 18:38:37 +0200 |
commit | b595727f2fe42dcd2e85a733fd2f2c321920b0d2 (patch) | |
tree | 244ca0f2431f46331a272b9f1e0d78897565618a /src/afl-fuzz-one.c | |
parent | ba3c7bfe40f9b17a691958e3525828385127ad25 (diff) | |
download | afl++-b595727f2fe42dcd2e85a733fd2f2c321920b0d2.tar.gz |
Fix Byte Decrement Havoc Mutation
While looking at the source code of the havoc mutations I realized that there seems to be a typo / copy+paste error with the SUBBYTE_ mutation. It is currently incrementing, instead of decrementing the value. Alternative Fix: Change the documentation to "/* Decrease byte by minus 1. */" to make it work as documented :-P
Diffstat (limited to 'src/afl-fuzz-one.c')
-rw-r--r-- | src/afl-fuzz-one.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/afl-fuzz-one.c b/src/afl-fuzz-one.c index 19f41ebe..ef80524f 100644 --- a/src/afl-fuzz-one.c +++ b/src/afl-fuzz-one.c @@ -2585,7 +2585,7 @@ havoc_stage: snprintf(afl->m_tmp, sizeof(afl->m_tmp), " SUBBYTE_"); strcat(afl->mutation, afl->m_tmp); #endif - out_buf[rand_below(afl, temp_len)]++; + out_buf[rand_below(afl, temp_len)]--; break; } |