fix(cli): potential overflow in integer conversion (#4993)

This commit is contained in:
Julio Lopez
2025-11-15 22:36:45 -08:00
committed by GitHub
parent 56061316b9
commit db4b89bc3d

View File

@@ -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
}