tar: invalid tar header checksum

Daniel Baluta daniel.baluta at gmail.com
Sun Feb 6 19:37:36 UTC 2011


On Sun, Feb 6, 2011 at 9:07 PM, Denys Vlasenko <vda.linux at googlemail.com> wrote:
> On Sunday 06 February 2011 19:54, Daniel Baluta wrote:
>> >> My question is why, isn't F0.tgz first decompressed to F0.tar, and
>> >> after that extracted to F0?
>> >
>> > There was a bug where archive autodetection was switching off -z.
>> >
>> > I fixed it in git and added the fix to 1.18.3 patch pile.
>>
>> Did you pushed it upstream?
>
> Yes. see log here:
>
> http://git.busybox.net/busybox/log/

Now is there, thank you.

Nitpick: I think commit [1] should have concerned only with solving the bug,
as in only doing this:

-			if (ENABLE_FEATURE_TAR_AUTODETECT && flags == O_RDONLY) {
-				get_header_ptr = get_header_tar;
+			if (ENABLE_FEATURE_TAR_AUTODETECT
+			 && flags == O_RDONLY
+			 && get_header_ptr == get_header_tar
+			) {

The other changes (char magic[2] vs uint16_t magic) are not related with
-z "switch off" and for better history deserved their own commit.

Anyhow, I've just tested the fix and it works.

thanks,
Daniel.

[1]  http://git.busybox.net/busybox/commit/?id=aef441cb4d567da5575c498141b21eb38dc3fdaf


More information about the busybox mailing list