Skip to content

Commit

Permalink
Merge pull request #923 from disconnect3d/patch-2
Browse files Browse the repository at this point in the history
net_linux.go: decode port as uint16 instead of int64
  • Loading branch information
Lomanic authored Aug 30, 2020
2 parents d9f9a85 + 5c1a9e7 commit c466301
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/net_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ func decodeAddress(family uint32, src string) (Addr, error) {
return Addr{}, fmt.Errorf("does not contain port, %s", src)
}
addr := t[0]
port, err := strconv.ParseInt("0x"+t[1], 0, 64)
port, err := strconv.ParseUint(t[1], 16, 16)
if err != nil {
return Addr{}, fmt.Errorf("invalid port, %s", src)
}
Expand Down

0 comments on commit c466301

Please sign in to comment.