From 8c8e8bc29af3600719cbcf3d194f245f8fdb5256 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Sat, 20 May 2017 22:47:19 +0800 Subject: glaring wrapfd problems fixed --- dbrandom.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'dbrandom.c') diff --git a/dbrandom.c b/dbrandom.c index b4b63cc..bb9c4c8 100644 --- a/dbrandom.c +++ b/dbrandom.c @@ -181,7 +181,8 @@ static void write_urandom() #endif } -static void seedfuzz(void) { +#ifdef DROPBEAR_FUZZ +void seedfuzz(void) { hash_state hs; sha1_init(&hs); sha1_process(&hs, "fuzzfuzzfuzz", strlen("fuzzfuzzfuzz")); @@ -190,6 +191,7 @@ static void seedfuzz(void) { counter = 0; donerandinit = 1; } +#endif /* Initialise the prng from /dev/urandom or prngd. This function can * be called multiple times */ @@ -203,7 +205,6 @@ void seedrandom() { #ifdef DROPBEAR_FUZZ if (fuzz.fuzzing || fuzz.recordf) { - seedfuzz(); return; } #endif -- cgit v1.2.1