]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Use randombytes_random() instead of randombytes_uniform() without bounds
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 16 Feb 2022 14:50:48 +0000 (15:50 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 16 Feb 2022 14:50:48 +0000 (15:50 +0100)
pdns/dnsdistdist/dnsdist-random.cc

index dc8a441f0d0bbfb38b33e28cec20ad8a32e0bfd7..d06abcd0e6d55fc222153bc0eb01b1b2857f3477 100644 (file)
@@ -39,7 +39,7 @@ namespace dnsdist
 void initRandom()
 {
 #ifdef HAVE_LIBSODIUM
-  srandom(randombytes_uniform(0xffffffff));
+  srandom(randombytes_random());
 #else
   {
     auto getSeed = []() {