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:
Yong Tang
2022-02-07 06:09:12 -08:00
committed by GitHub
parent 69473c5cad
commit 041e1eabc6
2 changed files with 2 additions and 5 deletions

View File

@@ -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 = "."