mirror of
https://github.com/wagoodman/dive
synced 2026-03-14 14:25:50 +01:00
Fix a problem with the size checking (#114)
This commit is contained in:
parent
7bbf457647
commit
5dbaa81670
1 changed files with 1 additions and 0 deletions
|
|
@ -207,6 +207,7 @@ func InitializeData(imageID string) ([]*Layer, []*filetree.FileTree, float64, fi
|
|||
var fileBuffer = make([]byte, header.Size)
|
||||
n, err = tarReader.Read(fileBuffer)
|
||||
if err != nil && err != io.EOF && int64(n) != header.Size {
|
||||
if err != nil && err != io.EOF || int64(n) != header.Size {
|
||||
logrus.Panic(err)
|
||||
}
|
||||
jsonFiles[name] = fileBuffer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue