From 618de3dfe7bdfe66a57f795be02ba43091c6187e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 13 Feb 2022 00:50:11 +0100 Subject: XOR seed provided to srand with data depending on current seed, in case it is already seed in a better manner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libar2simplified_decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libar2simplified_decode.c b/libar2simplified_decode.c index ab4db5a..2c2f38e 100644 --- a/libar2simplified_decode.c +++ b/libar2simplified_decode.c @@ -57,7 +57,7 @@ random_salt(char *out, size_t n, int (*random_byte_generator)(char *out, size_t } #endif if (!srand_called) { - srand((unsigned int)time(NULL)); + srand((unsigned int)time(NULL) ^ (unsigned int)rand()); srand_called = 1; } for(; i < n; i++) { -- cgit v1.2.3-70-g09d2