Mitigate 1 instance of potential integer overflow

This commit is contained in:
Bruce Baranowski 2022-04-19 11:06:25 -04:00 • committed by GitHub
parent a8c1b93610
commit 19613a3048
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -122,7 +122,7 @@ func makeArchetypalContainer(rng *rand.Rand, name string) (*Container, error) {
}
c = NewContainerRun(runs)
case strings.HasPrefix(name, "BM"):
size, err := strconv.Atoi(name[2:])
size, err := strconv.ParseInt(name[2:], 10, 32)
if err != nil {
return nil, fmt.Errorf("can't parse bitmap size: %v", err)
}