Fix: codeql alerts
This commit is contained in:
@ -62,7 +62,7 @@ func bindIfaceToDialer(ifaceName string, dialer *net.Dialer, network string, des
|
||||
if dialer.LocalAddr != nil {
|
||||
_, port, err := net.SplitHostPort(dialer.LocalAddr.String())
|
||||
if err == nil {
|
||||
local, _ = strconv.Atoi(port)
|
||||
local, _ = strconv.ParseInt(port, 10, 16)
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ func bindIfaceToListenConfig(ifaceName string, _ *net.ListenConfig, network, add
|
||||
port = "0"
|
||||
}
|
||||
|
||||
local, _ := strconv.Atoi(port)
|
||||
local, _ := strconv.ParseInt(port, 10, 16)
|
||||
|
||||
addr, err := lookupLocalAddr(ifaceName, network, nil, local)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user