From 86ada476395df43016d2f217b8381df3406492b3 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Tue, 23 Jun 2015 12:23:36 -0400 Subject: [PATCH] tar/asm: handle nil tar Header Signed-off-by: Vincent Batts --- tar/asm/disassemble.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tar/asm/disassemble.go b/tar/asm/disassemble.go index 30d088b..de25db0 100644 --- a/tar/asm/disassemble.go +++ b/tar/asm/disassemble.go @@ -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,