Subject: bin/20444: pax-as-tar does not detect premature end of archive
To: None <gnats-bugs@gnats.netbsd.org>
From: None <grant@netbsd.org>
List: netbsd-bugs
Date: 02/20/2003 22:35:58
>Number:         20444
>Category:       bin
>Synopsis:       pax-as-tar does not detect premature end of archive
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 20 03:37:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     grant beattie
>Release:        NetBSD 1.6O
>Organization:
>Environment:
System: NetBSD mofo 1.6O NetBSD 1.6O (MOFO) #2: Wed Feb 19 00:36:24 EST 2003 grant@mofo:/usr/src/sys/arch/i386/compile/MOFO i386
Architecture: i386
Machine: i386
>Description:
pax-as-tar does not appear to detect the premature end of a tar
archive, no warning or error is issued.

this is bad.

>How-To-Repeat:
I did the following:

# tar cf sparc64.tar sparc64
# tar tf sparc64.tar > /dev/null
(all is OK)

# dd if=sparc64.tar of=broken.tar bs=1024k count=10
# tar tf broken.tar > /dev/null
(all still appears OK)

# gnutar tf broken.tar > /dev/null
gnutar: Unexpected EOF in archive
gnutar: Error is not recoverable: exiting now

>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: