Project

General

Profile

Actions

Bug #6128

closed

tar should check prefix field when detecting EOT

Added by Joshua M. Clulow over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Category:
cmd - userland programs
Start date:
2015-08-16
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

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 .

Actions #1

Updated by Joshua M. Clulow over 6 years ago

  • Description updated (diff)
Actions #2

Updated by Joshua M. Clulow over 6 years ago

  • Description updated (diff)
Actions #3

Updated by Electric Monk about 6 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>

Actions

Also available in: Atom PDF