I ran govanish linter (it still in the WIP phase) against ssh3 repo and it found a but: compiler eliminated following error check from the binary:
remotePort, err = strconv.Atoi(array[1])
if err != nil {
return 0, nil, 0, fmt.Errorf("could not convert %s to int: %s", array[1], err)
} else if localPort > 0xFFFF {
return 0, nil, 0, fmt.Errorf("UDP port too large %d", remotePort)
}
2023/12/25 19:08:30 it seems like your code vanished from compiled binary: func=[parseAddrPort], file=[/home/sivukhin/code/ssh3/cmd/ssh3/main.go], line=[226], snippet:
return 0, nil, 0, fmt.Errorf("UDP port too large %d", remotePort)
This is a bug, because we need to validation remotePort value instead.
I ran govanish linter (it still in the WIP phase) against
ssh3
repo and it found a but: compiler eliminated following error check from the binary:This is a bug, because we need to validation
remotePort
value instead.This PR fixes this minor issue.