tar should check prefix field when detecting EOT
We found a tarball that did not cause an explicit error (
tar exited 0), but nonetheless did not produce the complete set of expected files. When extracted with
gtar, the file extracted completely. The tarball in question has a record where the name field is empty (first character is
NUL), but the prefix field is populated. This causes
endtape() to believe that we have reached the end of the archive, and extraction finishes.
A sample file with this admittedly peculiar condition is available at: https://s3.amazonaws.com/cfengine-package-repos/tarballs/cfengine-masterfiles-3.7.0.tar.gz
and mirrored at: https://us-east.manta.joyent.com/jmc/public/tmp/cfengine-masterfiles-3.7.0.tar.gz
NB: This bug mirrors Joyent-internal bug OS-4526 .
Updated by Electric Monk about 6 years ago
- Status changed from New to Closed
- % Done changed from 90 to 100
commit 28c4d110d9dd87af1d9dcf1bf503cea2e7c03b91 Author: Joshua M. Clulow <email@example.com> Date: 2015-10-13T00:03:01.000Z 6128 tar should check prefix field when detecting EOT 6129 tar debug output should be available in all builds Reviewed by: Robert Mustacchi <firstname.lastname@example.org> Reviewed by: Josef 'Jeff' Sipek <email@example.com> Reviewed by: Piotr Jasiukajtis <firstname.lastname@example.org> Approved by: Richard Lowe <email@example.com>