mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Using a better number generator to avoid conflicts
This commit is contained in:
parent
36dfe81da0
commit
98f45f357a
@ -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() })();
|
||||
|
Loading…
x
Reference in New Issue
Block a user