diff options
author | Mattias Andrée <maandree@kth.se> | 2022-02-13 00:50:11 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2022-02-13 00:50:11 +0100 |
commit | 618de3dfe7bdfe66a57f795be02ba43091c6187e (patch) | |
tree | 2c080f185bfce5edfa06be131ab84dd33febb273 | |
parent | Fix typo (diff) | |
download | libar2simplified-618de3dfe7bdfe66a57f795be02ba43091c6187e.tar.gz libar2simplified-618de3dfe7bdfe66a57f795be02ba43091c6187e.tar.bz2 libar2simplified-618de3dfe7bdfe66a57f795be02ba43091c6187e.tar.xz |
XOR seed provided to srand with data depending on current seed, in case it is already seed in a better manner
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | libar2simplified_decode.c | 2 |
1 files changed, 1 insertions, 1 deletions
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++) { |