diff options
author | van Hauser <vh@thc.org> | 2021-01-20 19:12:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-20 19:12:52 +0100 |
commit | 068bef5eab942df0a133c92522f2ab81b28ac636 (patch) | |
tree | 4689cb46e0d543af889609e260b1ff03455a2701 /custom_mutators/libprotobuf-mutator-example/vuln.c | |
parent | 271116f8705e08d1b4f924cda6c6cae1b0b5de2b (diff) | |
parent | b9e855b7b5ef3d7f367b32ee03459a9f5b21360f (diff) | |
download | afl++-068bef5eab942df0a133c92522f2ab81b28ac636.tar.gz |
Merge pull request #691 from AFLplusplus/dev
push to stable
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; +} + |