Security update for Core, with self-updated composer
[yaffs-website] / vendor / paragonie / random_compat / lib / random_bytes_libsodium_legacy.php
index 02160b91924efb19868fa2f7fc6af64b91ee7565..705af5262bde0e092ca26aff660ae38b8a6e3e87 100644 (file)
@@ -70,10 +70,10 @@ if (!is_callable('random_bytes')) {
                 $n = ($bytes - $i) > 1073741824
                     ? 1073741824
                     : $bytes - $i;
-                $buf .= Sodium::randombytes_buf($n);
+                $buf .= Sodium::randombytes_buf((int) $n);
             }
         } else {
-            $buf .= Sodium::randombytes_buf($bytes);
+            $buf .= Sodium::randombytes_buf((int) $bytes);
         }
 
         if (is_string($buf)) {