Fix: security issues & overflow potentiality (#465)

This commit is contained in:
Loyalsoldier
2020-11-28 21:56:20 +08:00
committed by GitHub
parent 0bf185e705
commit 8cb2db5321
5 changed files with 31 additions and 6 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ func ParseHost(rawHost string, defaultPort net.Port) (net.Destination, error) {
return net.Destination{}, err
}
} else if len(rawPort) > 0 {
intPort, err := strconv.Atoi(rawPort)
intPort, err := strconv.ParseUint(rawPort, 0, 16)
if err != nil {
return net.Destination{}, err
}