mirror of https://github.com/docker/docs.git
Merge pull request #9064 from recursive-madman/patch-1
Proposed fix for #8979
This commit is contained in:
commit
06899e0810
|
@ -64,7 +64,10 @@ func LoadImage(root string) (*Image, error) {
|
|||
// because a layer size of 0 (zero) is valid
|
||||
img.Size = -1
|
||||
} else {
|
||||
size, err := strconv.Atoi(string(buf))
|
||||
// Using Atoi here instead would temporarily convert the size to a machine
|
||||
// dependent integer type, which causes images larger than 2^31 bytes to
|
||||
// display negative sizes on 32-bit machines:
|
||||
size, err := strconv.ParseInt(string(buf), 10, 64)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue