Mercurial > dropbear
comparison 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 |
comparison
equal
deleted
inserted
replaced
1362:74a22c562cdf | 1363:b2f295125ed6 |
---|---|
6 | 6 |
7 int main(int argc, char ** argv) { | 7 int main(int argc, char ** argv) { |
8 int i; | 8 int i; |
9 buffer *input = buf_new(100000); | 9 buffer *input = buf_new(100000); |
10 | 10 |
11 #if DROPBEAR_TRACE | 11 for (i = 1; i < argc; i++) { |
12 debug_trace = 1; | 12 #if DEBUG_TRACE |
13 if (strcmp(argv[i], "-v") == 0) { | |
14 debug_trace = 1; | |
15 } | |
13 #endif | 16 #endif |
17 } | |
14 | 18 |
15 for (i = 1; i < argc; i++) { | 19 for (i = 1; i < argc; i++) { |
20 if (argv[i][0] == '-') { | |
21 // ignore arguments | |
22 continue; | |
23 } | |
24 | |
16 char* fn = argv[i]; | 25 char* fn = argv[i]; |
17 buf_setlen(input, 0); | 26 buf_setlen(input, 0); |
18 buf_readfile(input, fn); | 27 buf_readfile(input, fn); |
19 buf_setpos(input, 0); | 28 buf_setpos(input, 0); |
20 | 29 |