mirror of
https://github.com/kopia/kopia.git
synced 2025-12-23 22:57:50 -05:00
fix(cli): potential overflow in integer conversion (#4993)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user