Mercurial > dropbear
diff fuzz/fuzz-common.c @ 1757:517fb7b62438
Add some more variation to fuzzer random number generation
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 23 Oct 2020 23:32:44 +0800 |
parents | d5680e12ac33 |
children | 1365661f6be6 |
line wrap: on
line diff
--- a/fuzz/fuzz-common.c Fri Oct 23 23:10:20 2020 +0800 +++ b/fuzz/fuzz-common.c Fri Oct 23 23:32:44 2020 +0800 @@ -25,7 +25,7 @@ fuzz.input = m_malloc(sizeof(buffer)); _dropbear_log = fuzz_dropbear_log; crypto_init(); - fuzz_seed(); + fuzz_seed("start", 5); /* let any messages get flushed */ setlinebuf(stdout); } @@ -42,7 +42,7 @@ memset(&cli_ses, 0x0, sizeof(cli_ses)); wrapfd_setup(fuzz.input); - fuzz_seed(); + fuzz_seed(fuzz.input->data, MIN(fuzz.input->len, 16)); return DROPBEAR_SUCCESS; }