mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Using a better number generator to avoid conflicts
This commit is contained in:
@@ -87,7 +87,8 @@ std::vector<std::string> split(std::string str, char delimiter) {
|
||||
|
||||
|
||||
double random_number(const double from, const double to) {
|
||||
std::mt19937 mt(time(0));
|
||||
std::random_device rd;
|
||||
std::mt19937 mt(rd());
|
||||
return std::bind(
|
||||
std::uniform_real_distribution<>{from, to},
|
||||
std::default_random_engine{ mt() })();
|
||||
|
Reference in New Issue
Block a user