diff options
| author | Joey Jiao <joeyjiaojg@163.com> | 2021-01-18 11:05:57 +0800 |
|---|---|---|
| committer | Joey Jiao <joeyjiaojg@163.com> | 2021-01-20 15:46:41 +0800 |
| commit | 7ad8f6c7176c26c4fdbd80cec33f969235055839 (patch) | |
| tree | 4a4e29ff30ed5e9a5c24f2ea8f00bdcc7cf2c0a5 /custom_mutators/libprotobuf-mutator-example/vuln.c | |
| parent | 9d9e148e5cb9e9118289a1d52e0b7aeff040b8bb (diff) | |
| download | afl++-7ad8f6c7176c26c4fdbd80cec33f969235055839.tar.gz | |
android: Add libprotobuf aflpp custom_mutator example
Diffstat (limited to 'custom_mutators/libprotobuf-mutator-example/vuln.c')
| -rw-r--r-- | custom_mutators/libprotobuf-mutator-example/vuln.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/custom_mutators/libprotobuf-mutator-example/vuln.c b/custom_mutators/libprotobuf-mutator-example/vuln.c new file mode 100644 index 00000000..8ffb7080 --- /dev/null +++ b/custom_mutators/libprotobuf-mutator-example/vuln.c @@ -0,0 +1,17 @@ +#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); + int *ptr = NULL; + if( str[0] == '\x02' || str[0] == '\xe8') { + *ptr = 123; + } + return 0; +} + |
