summaryrefslogtreecommitdiffhomepage
path: root/dbrandom.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2017-05-20 22:47:19 +0800
committerMatt Johnston <matt@ucc.asn.au>2017-05-20 22:47:19 +0800
commitc1694230516fe1c3d78e4fd23aebd5fbc00ce21c (patch)
tree613a04012ce46ddecb6216301c7cca710cf17aac /dbrandom.c
parentfdc6f323923b36add7ab7112b1b4d05368bd5902 (diff)
glaring wrapfd problems fixed
--HG-- branch : fuzz
Diffstat (limited to 'dbrandom.c')
-rw-r--r--dbrandom.c5
1 files changed, 3 insertions, 2 deletions
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