From 49e9c364dc4a82af2969021cb5fc198d6e0705d2 Mon Sep 17 00:00:00 2001 From: Dean Sheather Date: Wed, 5 Apr 2023 21:31:42 +0000 Subject: [PATCH] chore: fix minor int coercion codeql vulnerability --- cli/agent.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/agent.go b/cli/agent.go index 706dc45d6cb51..697648b4a6c2a 100644 --- a/cli/agent.go +++ b/cli/agent.go @@ -336,8 +336,8 @@ func urlPort(u string) (int, error) { return -1, xerrors.Errorf("invalid url %q: %w", u, err) } if parsed.Port() != "" { - port, err := strconv.ParseInt(parsed.Port(), 10, 64) - if err == nil && port > 0 { + port, err := strconv.ParseUint(parsed.Port(), 10, 16) + if err == nil && port > 0 && port < 1<<16 { return int(port), nil } } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy