about summary refs log tree commit diff
path: root/test-instr.c
diff options
context:
space:
mode:
authorKhaled Yakdan <yakdan@code-intelligence.de>2019-09-04 23:20:18 +0200
committerKhaled Yakdan <yakdan@code-intelligence.de>2019-09-04 23:20:18 +0200
commitb31dff6beec6a7aa17da6f7f8a2eef198c263ccc (patch)
treec039aeed3572b171c2b7108cd650a0ee53c1b0f6 /test-instr.c
parent1b3f9713309d27c49b153f9b3af12d208076e93c (diff)
parentabf61ecc8f1b4ea3de59f818d859139637b29f32 (diff)
downloadafl++-b31dff6beec6a7aa17da6f7f8a2eef198c263ccc.tar.gz
Merge branch 'master-upstream' into custom_mutator_docs
# Conflicts:
#	afl-fuzz.c
Diffstat (limited to 'test-instr.c')
-rw-r--r--test-instr.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/test-instr.c b/test-instr.c
index 1b978c55..71838462 100644
--- a/test-instr.c
+++ b/test-instr.c
@@ -20,11 +20,16 @@
 
 int main(int argc, char** argv) {
 
-  char buf[8];
+  char  buff[8];
+  char* buf = buff;
+
+  if (argc > 1)
+    buf = argv[1];
+  else if (read(0, buf, sizeof(buf)) < 1) {
 
-  if (read(0, buf, sizeof(buf)) < 1) {
     printf("Hum?\n");
     exit(1);
+
   }
 
   if (buf[0] == '0')
@@ -37,3 +42,4 @@ int main(int argc, char** argv) {
   exit(0);
 
 }
+