mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
Fix a couple of code scanning alerts (#5157)
This PR fixed a couple of code scanning alerts: Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
@@ -45,7 +45,7 @@ func (wh Whoami) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
|
||||
if state.QName() == "." {
|
||||
srv.Hdr.Name = "_" + state.Proto() + state.QName()
|
||||
}
|
||||
port, _ := strconv.Atoi(state.Port())
|
||||
port, _ := strconv.ParseUint(state.Port(), 10, 16)
|
||||
srv.Port = uint16(port)
|
||||
srv.Target = "."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user