comparison fuzzer-preauth.c @ 1385:6c92e97553f1 fuzz

Add a flag whether to longjmp, missed that last commit
author Matt Johnston <matt@ucc.asn.au>
date Thu, 01 Jun 2017 21:30:26 +0800
parents ecdd4e8ae427
children f0990c284663
comparison
equal deleted inserted replaced
1384:ecdd4e8ae427 1385:6c92e97553f1
10 10
11 int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { 11 int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
12 static int once = 0; 12 static int once = 0;
13 if (!once) { 13 if (!once) {
14 setup_fuzzer(); 14 setup_fuzzer();
15 // XXX temporarily disable setjmp to debug asan segv
16 fuzz.do_jmp = 0;
15 once = 1; 17 once = 1;
16 } 18 }
17 19
18 if (fuzzer_set_input(Data, Size) == DROPBEAR_FAILURE) { 20 if (fuzzer_set_input(Data, Size) == DROPBEAR_FAILURE) {
19 return 0; 21 return 0;
38 40
39 int fakesock = 20; 41 int fakesock = 20;
40 wrapfd_add(fakesock, fuzz.input, PLAIN); 42 wrapfd_add(fakesock, fuzz.input, PLAIN);
41 43
42 m_malloc_set_epoch(1); 44 m_malloc_set_epoch(1);
43 // temporarily disable setjmp to debug asan segv 45 // XXX temporarily disable setjmp to debug asan segv
44 svr_session(fakesock, fakesock); 46 svr_session(fakesock, fakesock);
45 #if 0 47 #if 0
46 if (setjmp(fuzz.jmp) == 0) { 48 if (setjmp(fuzz.jmp) == 0) {
47 svr_session(fakesock, fakesock); 49 svr_session(fakesock, fakesock);
48 m_malloc_free_epoch(1, 0); 50 m_malloc_free_epoch(1, 0);