mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 02:53:15 +08:00
Fix: potential overflow in ssr (#1600)
This commit is contained in:
commit
85dc0b5527
@ -278,7 +278,7 @@ func getRandStartPos(length int, random *tools.XorShift128Plus) int {
|
||||
if length == 0 {
|
||||
return 0
|
||||
}
|
||||
return int(random.Next()%8589934609) % length
|
||||
return int(int64(random.Next()%8589934609) % int64(length))
|
||||
}
|
||||
|
||||
func (a *authChainA) getRandLength(length int, lastHash []byte, random *tools.XorShift128Plus) int {
|
||||
|
Loading…
Reference in New Issue
Block a user