diff options
author | Kim Alvefur <zash@zash.se> | 2015-04-26 19:50:24 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-04-26 19:50:24 +0200 |
commit | 38a580bfebacc3c2725f4224c0ca6e7b5c1f8a51 (patch) | |
tree | 0fe5bad3b5c3e84fd3e688b6de7e8d0244759e4b /net | |
parent | 2064173f3b789cf78d19e7489bdabe84cb9a94aa (diff) | |
download | prosody-38a580bfebacc3c2725f4224c0ca6e7b5c1f8a51.tar.gz prosody-38a580bfebacc3c2725f4224c0ca6e7b5c1f8a51.zip |
net.dns: Make sure argument to math.randomseed does not overflow a 32 bit *signed* int (blame Lua). Closes #439
Diffstat (limited to 'net')
-rw-r--r-- | net/dns.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dns.lua b/net/dns.lua index 28cb4419..763ee9ec 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -225,7 +225,7 @@ end function dns.random(...) -- - - - - - - - - - - - - - - - - - - dns.random - math.randomseed(math.floor(10000*socket.gettime()) % 0x100000000); + math.randomseed(math.floor(10000*socket.gettime()) % 0x80000000); dns.random = math.random; return dns.random(...); end |