From: Remi Gacogne Date: Wed, 16 Feb 2022 14:50:48 +0000 (+0100) Subject: dnsdist: Use randombytes_random() instead of randombytes_uniform() without bounds X-Git-Tag: rec-4.7.0-alpha1~11^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=235cfd8bd6e3c1c48ae1090f97527343774b061c;p=thirdparty%2Fpdns.git dnsdist: Use randombytes_random() instead of randombytes_uniform() without bounds --- diff --git a/pdns/dnsdistdist/dnsdist-random.cc b/pdns/dnsdistdist/dnsdist-random.cc index dc8a441f0d..d06abcd0e6 100644 --- a/pdns/dnsdistdist/dnsdist-random.cc +++ b/pdns/dnsdistdist/dnsdist-random.cc @@ -39,7 +39,7 @@ namespace dnsdist void initRandom() { #ifdef HAVE_LIBSODIUM - srandom(randombytes_uniform(0xffffffff)); + srandom(randombytes_random()); #else { auto getSeed = []() {