diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-10-18 15:38:44 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-10-18 15:44:57 +0200 |
| commit | cdfb7755a6af2e95e8598ca8e8d6896c745bcd72 (patch) | |
| tree | fce0cfa5a1d83ef5f9c6f84a6f0875bf1903323f /src/netbase.cpp | |
| parent | Merge #8935: Documentation: Building on Windows with WSL (diff) | |
| parent | Kill insecure_random and associated global state (diff) | |
| download | discoin-cdfb7755a6af2e95e8598ca8e8d6896c745bcd72.tar.xz discoin-cdfb7755a6af2e95e8598ca8e8d6896c745bcd72.zip | |
Merge #8914: Kill insecure_random and associated global state
5eaaa83 Kill insecure_random and associated global state (Wladimir J. van der Laan)
Diffstat (limited to 'src/netbase.cpp')
| -rw-r--r-- | src/netbase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp index 7d7f1b678..9fe34108f 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -596,8 +596,8 @@ static bool ConnectThroughProxy(const proxyType &proxy, const std::string& strDe // do socks negotiation if (proxy.randomize_credentials) { ProxyCredentials random_auth; - random_auth.username = strprintf("%i", insecure_rand()); - random_auth.password = strprintf("%i", insecure_rand()); + static std::atomic_int counter; + random_auth.username = random_auth.password = strprintf("%i", counter++); if (!Socks5(strDest, (unsigned short)port, &random_auth, hSocket)) return false; } else { |