aboutsummaryrefslogtreecommitdiffstats
path: root/libar2simplified_decode.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-02-13 00:50:11 +0100
committerMattias Andrée <maandree@kth.se>2022-02-13 00:50:11 +0100
commit618de3dfe7bdfe66a57f795be02ba43091c6187e (patch)
tree2c080f185bfce5edfa06be131ab84dd33febb273 /libar2simplified_decode.c
parentFix typo (diff)
downloadlibar2simplified-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.c2
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++) {