tar: corrupted octal value in tar header

Denys Vlasenko vda.linux at googlemail.com
Sat Sep 19 22:33:43 UTC 2009


On Saturday 19 September 2009 15:09, Peter Renzland wrote:
> Attempts to extract tar files produced by Mac OS X 10.6 (Snow Leopard)  
> files fail with the error:
> 
> "tar: corrupted octal value in tar header" from
> BusyBox v1.14.2 (2009-07-02 18:01:37 CEST) built-in shell (ash)
> 
> On GNU/Linux 2.4.20, on a Linksys WRT54GL Router (MIPS) running Tomato  
> 1.25.
> 
> 
> Is this a known problem?
> If so, is it a problem with Linux 2.4?
> Or with Busybox?
> 
> Or with the Busybox config in Tomato?
> Or might it be a problem with Snow Leopard's new tar format?
> 
> 
> Here are the two headers (complete files, actually) -- leo: leopard,  
> sno: snow leopard --
> 
> There seems to have been some shifts, involving nulls, spaces, and  
> zeroes.
> 
>   l ???.tar; od -ta leo.tar; echo; od -ta sno.tar
> -rw-r--r--  1 peter  staff  10240 19 Sep 01:04 leo.tar
> -rw-r--r--  1 peter  staff   2048 19 Sep 00:53 sno.tar

Here is what I can decipher:

struct TarHeader {                /* byte offset */
        char name[NAME_SIZE];     /*   0-99 */
> 0000000    f   o   o nul nul nul nul nul nul nul nul nul nul nul nul nul
> 0000020  nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
> *
        char mode[8];             /* 100-107 */
        char uid[8];              /* 108-115 */
> 0000140  nul nul nul nul   0   0   0   0   6   4   4 nul   0   0   0   0
        char gid[8];              /* 116-123 */
        char size[12];            /* 124-135 */
> 0000160    7   6   5 nul   0   0   0   0   7   6   5 nul   0   0   0   0
        char mtime[12];           /* 136-147 */
> 0000200    0   0   0   0   0   0   4 nul   1   1   2   5   5   0   6   2
        char chksum[8];           /* 148-155 */
        char typeflag;            /* 156-156 */
        char linkname[NAME_SIZE]; /* 157-256 */
> 0000220    2   3   4 nul   0   0   7   5   5   0 nul  sp   0 nul nul nul
> 0000240  nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
> *
        char magic[8];            /* 257-264 */
        char uname[32];           /* 265-296 */
> 0000400  nul   u   s   t   a   r  sp  sp nul   p   e   t   e   r nul nul
> 0000420  nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
        char gname[32];           /* 297-328 */
        char devmajor[8];         /* 329-336 */
        char devminor[8];         /* 337-344 */
        char prefix[155];         /* 345-499 */
        char padding[12];         /* 500-512 (pad to exactly TAR_BLOCK_SIZE) */
> *
> 0001000    f   o   o  nl nul nul nul nul nul nul nul nul nul nul nul nul
> 0001020  nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
> *
> 0024000

I do not see any fields with invalid octal digits.

Can you post an example file?
--
vda


More information about the busybox mailing list