[BusyBox] Changed behavior or bug in tar.

Glenn McGrath bug1 at optushome.com.au
Sun Nov 18 08:00:30 UTC 2001


On Sun, 18 Nov 2001 15:18:22 +0100
"Thomas Lundquist" <lists at zelow.no> wrote:

> tar in: BusyBox v0.61.pre (2001.09.29-00:43+0000) multi-call binary
> 
> will handle:
> 
> bzcat add.bz2 | ./busybox tar -x
> 
> but lately (at least a month) this hasn't worked, it does 
> not extract anything.
> 
> I checked with the cvs comments and it may have been the 1.127 
> revision, which seems to have changed a bit of code.
> 
> 

Something very weird is going on with tar, i confirmed this error with a
tar file i had laying around and it failed to extract, it extracts with
gnu tar.

Looking into it, i found it was failing when checking to see if the
header has valid magic.
It used to print an error message if the tar file had invalid magic, but
the error message was disabled as it was reporting problems with tar
files that had trailing 0's appended to it, to round the file upto a
certain size.

Looking at the tar file that failed to extract in a binary editor and
the magic is just 0's, whereas it should be "ustar".

I created a fresh tar file with gnu tar and it does have the magic in
there and busybox tar works fine.

The easy fix is to just disable magic tests always, but its a bit of a
worry that that some tar files a created without filling in such basic
header fields.


Glenn





More information about the busybox mailing list