diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2021-04-09 10:07:46 +0200 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2021-04-16 11:43:35 -0400 |
commit | a23aecf1a69687f5a75784e3eef1500e8872c3d8 (patch) | |
tree | f53cffd12796cfada035bd43e6281f438a9d8693 /pkg/cgroups/cgroups.go | |
parent | b54fe553447cfce554ae966a0de7ee4cf4ed596d (diff) | |
download | podman-a23aecf1a69687f5a75784e3eef1500e8872c3d8.tar.gz podman-a23aecf1a69687f5a75784e3eef1500e8872c3d8.tar.bz2 podman-a23aecf1a69687f5a75784e3eef1500e8872c3d8.zip |
cgroups: force 64 bits to ParseUint
[NO TESTS NEEDED]
force bitsSize==64 so that the string is always parsed to a uint64
instead of using the native int size, that could be not big enough on
32 bits arches.
Closes: https://github.com/containers/podman/issues/9979
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/cgroups/cgroups.go')
-rw-r--r-- | pkg/cgroups/cgroups.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/cgroups/cgroups.go b/pkg/cgroups/cgroups.go index 608e1647a..aefb5183b 100644 --- a/pkg/cgroups/cgroups.go +++ b/pkg/cgroups/cgroups.go @@ -265,7 +265,7 @@ func readFileAsUint64(path string) (uint64, error) { if v == "max" { return math.MaxUint64, nil } - ret, err := strconv.ParseUint(v, 10, 0) + ret, err := strconv.ParseUint(v, 10, 64) if err != nil { return ret, errors.Wrapf(err, "parse %s from %s", v, path) } |