summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2018-08-10 23:20:55 -0400
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2018-08-10 23:20:55 -0400
commitaf5ef1002bb45c9afd2e0ccdcad03ff49862907d (patch)
treef759c6bdd9b29dc237902eed8b99d9843437b252
parentee22fe98c2fdf9e5922146cba8b92d7004ee6b51 (diff)
downloadrandom-seed-af5ef1002bb45c9afd2e0ccdcad03ff49862907d.tar.xz
random-seed-af5ef1002bb45c9afd2e0ccdcad03ff49862907d.zip
Add legacy file format load support
-rw-r--r--random-seed.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/random-seed.c b/random-seed.c
index 114f8fa..cb6071a 100644
--- a/random-seed.c
+++ b/random-seed.c
@@ -236,6 +236,11 @@ static bool load(FILE *seed_file) {
}
}
+ if (!linenum) {
+ fputs("seed file has no commands, assuming legacy format. disabling entropy credit\n", stderr);
+ credit_entropy = false;
+ }
+
if (credit_entropy && !done) {
fputs("missing done command, random seed file probably truncated. disabling entropy credit\n", stderr);
credit_entropy = false;