This commit is contained in:
Matt Johnston 2013-04-02 18:59:00 +08:00
parent f8a92d1eed
commit dcd1527a11

View File

@ -157,9 +157,9 @@ static void write_urandom()
/* This is opportunistic, don't worry about failure */ /* This is opportunistic, don't worry about failure */
unsigned char buf[INIT_SEED_SIZE]; unsigned char buf[INIT_SEED_SIZE];
FILE *f = fopen(DROPBEAR_URANDOM_DEV, "w"); FILE *f = fopen(DROPBEAR_URANDOM_DEV, "w");
if (!f) { if (!f) {
return; return;
} }
genrandom(buf, sizeof(buf)); genrandom(buf, sizeof(buf));
fwrite(buf, sizeof(buf), 1, f); fwrite(buf, sizeof(buf), 1, f);
fclose(f); fclose(f);