comparison fuzz.h @ 1356:3677a510f545 fuzz

add wrapfd. improve fuzzer in makefile
author Matt Johnston <matt@ucc.asn.au>
date Fri, 19 May 2017 00:48:46 +0800
parents 5c2899e35b63
children 08f4fa4dc6a0
comparison
equal deleted inserted replaced
1355:3fdd8c5a0195 1356:3677a510f545
4 #include "includes.h" 4 #include "includes.h"
5 #include "buffer.h" 5 #include "buffer.h"
6 6
7 #ifdef DROPBEAR_FUZZ 7 #ifdef DROPBEAR_FUZZ
8 8
9 // once per process
9 void svr_setup_fuzzer(void); 10 void svr_setup_fuzzer(void);
11
12 // once per input. returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE
13 int fuzzer_set_input(const uint8_t *Data, size_t Size);
10 14
11 struct dropbear_fuzz_options { 15 struct dropbear_fuzz_options {
12 int fuzzing; 16 int fuzzing;
13 17
14 // to record an unencrypted stream 18 // to record an unencrypted stream
15 FILE* recordf; 19 FILE* recordf;
16 20
17 // fuzzing input 21 // fuzzing input
18 buffer input; 22 buffer *input;
19 23
20 // dropbear_exit() jumps back 24 // dropbear_exit() jumps back
21 sigjmp_buf jmp; 25 sigjmp_buf jmp;
22 26
23 uid_t pw_uid; 27 uid_t pw_uid;