diff options
author | van Hauser <vh@thc.org> | 2021-01-20 14:00:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-20 14:00:26 +0100 |
commit | b9e855b7b5ef3d7f367b32ee03459a9f5b21360f (patch) | |
tree | 4689cb46e0d543af889609e260b1ff03455a2701 /custom_mutators/libprotobuf-mutator-example/vuln.c | |
parent | 2cd3010f824fe35b68fbdfbba832357e952bf9d6 (diff) | |
parent | 02079d8ef9c1661e4badd464ebcd7668e88118fc (diff) | |
download | afl++-b9e855b7b5ef3d7f367b32ee03459a9f5b21360f.tar.gz |
Merge pull request #695 from joeyjiaojg/dev
Fix Porting of AFLplusplus for Android
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; +} + |