From af5ef1002bb45c9afd2e0ccdcad03ff49862907d Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Fri, 10 Aug 2018 23:20:55 -0400 Subject: Add legacy file format load support --- random-seed.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- cgit v1.2.3-54-g00ecf