diff options
author | Andrea Fioraldi <andreafioraldi@gmail.com> | 2020-04-03 09:39:12 +0200 |
---|---|---|
committer | Andrea Fioraldi <andreafioraldi@gmail.com> | 2020-04-03 09:39:12 +0200 |
commit | 8610b0e40677846ba65de55fcaedd2ebee66a511 (patch) | |
tree | f5b6409fe840ac69417e348795b69cbeb0a072fc /test/test-custom-mutator.c | |
parent | ffb4767fc1adf2383173e5655d4f1fcf7e0982b6 (diff) | |
parent | 97cae2df9975589eb05a543f92c6ba232242fd7b (diff) | |
download | afl++-8610b0e40677846ba65de55fcaedd2ebee66a511.tar.gz |
Merge branch 'dev' of github.com:vanhauser-thc/AFLplusplus into dev
Diffstat (limited to 'test/test-custom-mutator.c')
-rw-r--r-- | test/test-custom-mutator.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/test-custom-mutator.c b/test/test-custom-mutator.c new file mode 100644 index 00000000..83baafab --- /dev/null +++ b/test/test-custom-mutator.c @@ -0,0 +1,19 @@ +/** + * Reference: https://github.com/bruce30262/libprotobuf-mutator_fuzzing_learning/blob/master/4_libprotobuf_aflpp_custom_mutator/vuln.c + */ + +#include <stdio.h> +#include <string.h> +#include <math.h> +#include <stdlib.h> +#include <unistd.h> + +int main(int argc, char *argv[]) +{ + char str[100]; + read(0, str, 100); + if( str[6] == 'A') { + abort(); + } + return 0; +} |