Mercurial > dropbear
diff fuzz-harness.c @ 1363:b2f295125ed6 fuzz
-v for debug_trace
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 21 May 2017 18:53:33 +0800 |
parents | 6b89eb92f872 |
children | 9891bc31a1b3 |
line wrap: on
line diff
--- a/fuzz-harness.c Sun May 21 18:53:09 2017 +0800 +++ b/fuzz-harness.c Sun May 21 18:53:33 2017 +0800 @@ -8,11 +8,20 @@ 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);