tar: corrupted octal value in tar header (Apple Snow Leopard)

Denys Vlasenko vda.linux at googlemail.com
Wed Sep 23 15:20:30 UTC 2009


>>> Since there is no longer a current POSIX tar standard, perhaps it might
>>> make
>>> sense to create a Busybox term:
>>>
>>> "NEW APPLE COMPATIBILITY" which is equivalent to "OLDGNU COMPATIBILITY".
>>
>> I think the question is: do we need to have
>> FEATURE_TAR_OLDGNU_COMPATIBILITY
>> at all? Maybe it makes sense to make it unconditionally on.
>>
>> It is less than 100 bytes:
>>
>> function                                             old     new   delta
>> getOctal                                              63      57      -6
>> get_header_tar                                      1612    1533     -79
>>
>> ------------------------------------------------------------------------------
>> (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-85)             Total: -85
>> bytes
>>
>> What do you think?
>> --
>> vda
>
> This sounds like a good idea, resulting in greater simplicity and
> portability.


I did not remove FEATURE_TAR_OLDGNU_COMPATIBILITY, but
I made it so that spaces at the ned of the fields
will be accepted even with FEATURE_TAR_OLDGNU_COMPATIBILITY off.
See attached.

Code growth for !FEATURE_TAR_OLDGNU_COMPATIBILITY:

function                                             old     new   delta
get_header_tar                                      1533    1582     +49
getOctal                                              57      63      +6

--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: z.diff
Type: application/octet-stream
Size: 1865 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090923/a2428f53/attachment.obj>


More information about the busybox mailing list