From 3dc72ffb6be7f9acb9788d5cfa8d99c557418621 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 12 May 2022 16:54:40 +0100 Subject: Added test for prefetch validation --- frida_mode/test/dynamic/testinstrlib.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 frida_mode/test/dynamic/testinstrlib.c (limited to 'frida_mode/test/dynamic/testinstrlib.c') diff --git a/frida_mode/test/dynamic/testinstrlib.c b/frida_mode/test/dynamic/testinstrlib.c new file mode 100644 index 00000000..987cbf91 --- /dev/null +++ b/frida_mode/test/dynamic/testinstrlib.c @@ -0,0 +1,14 @@ +#include + +void testinstrlib(char *buf, int len) { + if (len < 1) return; + buf[len] = 0; + + // we support three input cases + if (buf[0] == '0') + printf("Looks like a zero to me!\n"); + else if (buf[0] == '1') + printf("Pretty sure that is a one!\n"); + else + printf("Neither one or zero? How quaint!\n"); +} -- cgit 1.4.1