Bug #6128
closedtar should check prefix field when detecting EOT
100%
Description
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 almost 7 years ago
- Status changed from New to Closed
- % Done changed from 90 to 100
git commit 28c4d110d9dd87af1d9dcf1bf503cea2e7c03b91
commit 28c4d110d9dd87af1d9dcf1bf503cea2e7c03b91 Author: Joshua M. Clulow <jmc@joyent.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 <rm@joyent.com> Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Reviewed by: Piotr Jasiukajtis <estibi@me.com> Approved by: Richard Lowe <richlowe@richlowe.net>