summaryrefslogtreecommitdiff
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
commit8c8e8bc29af3600719cbcf3d194f245f8fdb5256 (patch)
tree9475f9df84c924c6ef1e9806bf669fe211c94f00 /dbrandom.c
parent5fef5159de5ffa389b5535bd1e59eb3d03ca6c4a (diff)
downloaddropbear-8c8e8bc29af3600719cbcf3d194f245f8fdb5256.tar.gz
glaring wrapfd problems fixed
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