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
This commit is contained in:
Tobias Scharnowski
2022-06-10 18:38:37 +02:00
committed by GitHub
parent ba3c7bfe40
commit b595727f2f

View File

@ -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;
}