From 7ad8f6c7176c26c4fdbd80cec33f969235055839 Mon Sep 17 00:00:00 2001 From: Joey Jiao Date: Mon, 18 Jan 2021 11:05:57 +0800 Subject: android: Add libprotobuf aflpp custom_mutator example --- custom_mutators/libprotobuf-mutator-example/vuln.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 custom_mutators/libprotobuf-mutator-example/vuln.c (limited to 'custom_mutators/libprotobuf-mutator-example/vuln.c') 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 +#include +#include +#include +#include + +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; +} + -- cgit 1.4.1