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

@ -107,10 +107,10 @@ func (m *Metadata) UDPAddr() *net.UDPAddr {
if m.NetWork != UDP || m.DstIP == nil {
return nil
}
port, _ := strconv.Atoi(m.DstPort)
port, _ := strconv.ParseInt(m.DstPort, 10, 16)
return &net.UDPAddr{
IP: m.DstIP,
Port: port,
Port: int(port),
}
}