From cc94b23d13fb34984d8860e67793aa96c36f04bf Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Wed, 1 Jun 2022 21:38:05 +0800 Subject: [PATCH] Chore: make CodeQL happy --- tunnel/tunnel.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tunnel/tunnel.go b/tunnel/tunnel.go index 07284880..f9e13016 100644 --- a/tunnel/tunnel.go +++ b/tunnel/tunnel.go @@ -333,9 +333,9 @@ func match(metadata *C.Metadata) (C.Proxy, C.Rule, error) { if !processFound && rule.ShouldFindProcess() { processFound = true - srcPort, err := strconv.Atoi(metadata.SrcPort) + srcPort, err := strconv.ParseUint(metadata.SrcPort, 10, 16) if err == nil { - path, err := P.FindProcessName(metadata.NetWork.String(), metadata.SrcIP, srcPort) + path, err := P.FindProcessName(metadata.NetWork.String(), metadata.SrcIP, int(srcPort)) if err != nil { log.Debugln("[Process] find process %s: %v", metadata.String(), err) } else {