tar/asm: handle nil tar Header

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2015-06-23 12:23:36 -04:00
parent 174287a8aa
commit 86ada47639
1 changed files with 3 additions and 0 deletions

View File

@ -64,6 +64,9 @@ func NewInputTarStream(r io.Reader, p storage.Packer, fp storage.FilePutter) (io
}
break // not return. We need the end of the reader.
}
if hdr == nil {
break // not return. We need the end of the reader.
}
if _, err := p.AddEntry(storage.Entry{
Type: storage.SegmentType,