diff dbrandom.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 6e5037ae2c1c
children c3ca130d193a
line wrap: on
line diff
--- a/dbrandom.c	Fri Oct 23 23:10:20 2020 +0800
+++ b/dbrandom.c	Fri Oct 23 23:32:44 2020 +0800
@@ -150,10 +150,11 @@
 }
 
 #if DROPBEAR_FUZZ
-void fuzz_seed(void) {
+void fuzz_seed(const unsigned char* dat, unsigned int len) {
 	hash_state hs;
 	sha1_init(&hs);
 	sha1_process(&hs, "fuzzfuzzfuzz", strlen("fuzzfuzzfuzz"));
+	sha1_process(&hs, dat, len);
 	sha1_done(&hs, hashpool);
 
 	counter = 0;