Fix: codeql alerts

This commit is contained in:
Dreamacro
2021-11-08 00:31:08 +08:00
parent 1a7830f18e
commit d40e5e4fe6
6 changed files with 9 additions and 9 deletions

View File

@ -39,7 +39,7 @@ func (p *Port) ShouldResolveIP() bool {
}
func NewPort(port string, adapter string, isSource bool) (*Port, error) {
_, err := strconv.Atoi(port)
_, err := strconv.ParseUint(port, 10, 16)
if err != nil {
return nil, errPayload
}