[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] 'BZh[1-9]' file in v7 format archive confuses GNU tar
From: |
Michał Górny |
Subject: |
[Bug-tar] 'BZh[1-9]' file in v7 format archive confuses GNU tar |
Date: |
Mon, 26 Nov 2018 18:44:14 +0100 |
Hi,
Here's another quirk I've found:
$ echo test > BZh5
$ tar --format=v7 -cf test.tar BZh5
$ tar -xf test.tar
bzip2: stdin: compressed data error: bad block header magic
tar: Child returned status 1
tar: Error is not recoverable: exiting now
I think the easiest solution would be to copy the trick used
by libarchive, citing:
/* After BZh[1-9], there must be either a data block
* which begins with 0x314159265359 or an end-of-data
* marker of 0x177245385090. */
However, this wouldn't help with the harder (though less likely to occur
accidentally) case of:
$ echo test > 'BZh91AY&SY'
;-)
--
Best regards,
Michał Górny
signature.asc
Description: This is a digitally signed message part
- [Bug-tar] 'BZh[1-9]' file in v7 format archive confuses GNU tar,
Michał Górny <=
- Re: [Bug-tar] 'BZh[1-9]' file in v7 format archive confuses GNU tar, Joerg Schilling, 2018/11/27
- Re: [Bug-tar] 'BZh[1-9]' file in v7 format archive confuses GNU tar, Sergey Poznyakoff, 2018/11/27
- Re: [Bug-tar] 'BZh[1-9]' file in v7 format archive confuses GNU tar, Sergey Poznyakoff, 2018/11/27
- Re: [Bug-tar] 'BZh[1-9]' file in v7 format archive confuses GNU tar, Michał Górny, 2018/11/27
- Re: [Bug-tar] 'BZh[1-9]' file in v7 format archive confuses GNU tar, Sergey Poznyakoff, 2018/11/27
- Re: [Bug-tar] 'BZh[1-9]' file in v7 format archive confuses GNU tar, Michał Górny, 2018/11/27
- Re: [Bug-tar] 'BZh[1-9]' file in v7 format archive confuses GNU tar, Sergey Poznyakoff, 2018/11/28
- Re: [Bug-tar] 'BZh[1-9]' file in v7 format archive confuses GNU tar, Michał Górny, 2018/11/28