diff options
author | Matt Johnston <matt@ucc.asn.au> | 2013-05-21 12:09:35 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2013-05-21 12:09:35 +0800 |
commit | 04518e9e801ee57bd6d4caab470da8dc0ec98fd7 (patch) | |
tree | 5e46adedc7cd70e6f7b0547a200544cbcf80b96b /random.c | |
parent | 41f531ceafc86507c82847f44f9c9e126d798c48 (diff) | |
parent | a57947c513a53e77de0b2eaa67ca6404f444a29f (diff) |
merge in HEAD
--HG--
branch : ecc
Diffstat (limited to 'random.c')
-rw-r--r-- | random.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -158,6 +158,9 @@ static void write_urandom() /* This is opportunistic, don't worry about failure */ unsigned char buf[INIT_SEED_SIZE]; FILE *f = fopen(DROPBEAR_URANDOM_DEV, "w"); + if (!f) { + return; + } genrandom(buf, sizeof(buf)); fwrite(buf, sizeof(buf), 1, f); fclose(f); |