about summary refs log tree commit diff
path: root/frida_mode/test/dynamic/testinstrlib.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2022-05-16 11:15:21 +0200
committerGitHub <noreply@github.com>2022-05-16 11:15:21 +0200
commitc08eeb95ca78625cf3f8a96bd04320c57c50d0f1 (patch)
tree2eecf55a92eec04e67aa3a9d9bec8e5f50659de6 /frida_mode/test/dynamic/testinstrlib.c
parent7c755a675f561eb1a8fd0ed4668cd56f43122fea (diff)
parent3dc72ffb6be7f9acb9788d5cfa8d99c557418621 (diff)
downloadafl++-c08eeb95ca78625cf3f8a96bd04320c57c50d0f1.tar.gz
Merge pull request #1410 from WorksButNotTested/dynamic
A few updates
Diffstat (limited to 'frida_mode/test/dynamic/testinstrlib.c')
-rw-r--r--frida_mode/test/dynamic/testinstrlib.c14
1 files changed, 14 insertions, 0 deletions
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 <stdio.h>
+
+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");
+}