From db4b89bc3db1de195cdb4ba935bcbc988b50a51a Mon Sep 17 00:00:00 2001 From: Julio Lopez <1953782+julio-lopez@users.noreply.github.com> Date: Sat, 15 Nov 2025 22:36:45 -0800 Subject: [PATCH] fix(cli): potential overflow in integer conversion (#4993) --- cli/throttle_set.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/throttle_set.go b/cli/throttle_set.go index 3f0d0b164..4bb2e7118 100644 --- a/cli/throttle_set.go +++ b/cli/throttle_set.go @@ -109,7 +109,7 @@ func (c *commonThrottleSet) setThrottleInt(ctx context.Context, desc string, val return nil } - v, err := strconv.ParseInt(str, 10, 64) + v, err := strconv.Atoi(str) if err != nil { return errors.Wrapf(err, "can't parse the %v %q", desc, str) } @@ -118,7 +118,7 @@ func (c *commonThrottleSet) setThrottleInt(ctx context.Context, desc string, val log(ctx).Infof("Setting %v to %v.", desc, v) - *val = int(v) + *val = v return nil }