about summary refs log tree commit diff
path: root/test/test-compcov.c
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2019-09-22 08:08:47 +0200
committerhexcoder- <heiko@hexco.de>2019-09-22 08:08:47 +0200
commite36e5f4fc927370c3c04fd589aca23197e1b518a (patch)
treedb6df0d5e22b5e0f7bd79f4622cfcdbfc275ff0c /test/test-compcov.c
parent1e503a586d9f3d45e27bc1dbb3b2093c1e5f7b6f (diff)
parent6488400fbfe94e14f95c9d86d16987e3eac6e273 (diff)
downloadafl++-e36e5f4fc927370c3c04fd589aca23197e1b518a.tar.gz
Merge branch 'master' of https://github.com/vanhauser-thc/AFLplusplus
Diffstat (limited to 'test/test-compcov.c')
-rw-r--r--test/test-compcov.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/test-compcov.c b/test/test-compcov.c
new file mode 100644
index 00000000..bbad3aed
--- /dev/null
+++ b/test/test-compcov.c
@@ -0,0 +1,29 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+
+int main(int argc, char** argv) {
+
+  char *buf;
+
+  if (argc > 1) {
+  
+    if (strcmp(argv[1], "LIBTOKENCAP") == 0)
+      printf("your string was libtokencap\n");
+    else if (strcmp(argv[1], "BUGMENOT") == 0)
+      printf("your string was bugmenot\n");
+    else if (strcmp(argv[1], "BUFFEROVERFLOW") == 0) {
+      buf = malloc(16);
+      strcpy(buf, "TEST");
+      strcat(buf, argv[1]);
+      printf("This will only crash with libdislocator: %s\n", buf);
+      return 0;
+    } else
+      printf("I do not know your string\n");
+  
+  }
+
+  return 0;
+
+}