From 18ea116827eda29ba71ac30e96257937e965941b Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Sun, 21 May 2017 18:53:33 +0800 Subject: [PATCH] -v for debug_trace --HG-- branch : fuzz --- fuzz-harness.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/fuzz-harness.c b/fuzz-harness.c index c31d2b7..41bd946 100644 --- a/fuzz-harness.c +++ b/fuzz-harness.c @@ -8,11 +8,20 @@ int main(int argc, char ** argv) { int i; buffer *input = buf_new(100000); -#if DROPBEAR_TRACE - debug_trace = 1; + for (i = 1; i < argc; i++) { +#if DEBUG_TRACE + if (strcmp(argv[i], "-v") == 0) { + debug_trace = 1; + } #endif + } for (i = 1; i < argc; i++) { + if (argv[i][0] == '-') { + // ignore arguments + continue; + } + char* fn = argv[i]; buf_setlen(input, 0); buf_readfile(input, fn);