From e54dda18e97ade18658f971a505542352db511a1 Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Fri, 20 Sep 2024 14:01:45 -0400 Subject: [PATCH] Fix code scanning alert #29: Incorrect conversion between integer types Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- libgo/go/net/http/pprof/pprof.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgo/go/net/http/pprof/pprof.go b/libgo/go/net/http/pprof/pprof.go index 1ad2a89356080..6d45d7dc9af2f 100644 --- a/libgo/go/net/http/pprof/pprof.go +++ b/libgo/go/net/http/pprof/pprof.go @@ -202,7 +202,7 @@ func Symbol(w http.ResponseWriter, r *http.Request) { } pc, _ := strconv.ParseUint(string(word), 0, 64) if pc != 0 { - if pc > ^uint64(0)>>1 { + if pc > ^uint64(uintptr(0)) { fmt.Fprintf(&buf, "address out of range: %v\n", pc) continue }