Re: star-1.5a64 aborts on reading archives with _small_ garbage tails

Joerg Schilling <[email protected]>
Newsgroups gmane.comp.archivers.star.user
Message-ID <43073EE0.nail431111RPY@burner>
[email protected] wrote:

> > This is not a bug but intended behavior on a missusage.
> > A valid TAR archive is always a multiple of 512 bytes.
>
> I plead guilty and promise to better disguise my misbehavior
> in future. 
>
>
> Nevertheless, please consider wether it is possible to make
> sure that all uncomplained input is processed by the unpacker
> before star aborts. (Of course, the unpacker should not unpack
> obviously damaged data blocks.)
>
> At restore time, any effort of the backup tool is welcome.
> The mental state of the user is not the most stable one
> in these moments.

Well, it seems that you did convince me as star did never complain
if the read size modulo 512 was not zero but the amount itself
was > 512.

So star was not behaving orthogonal for all cases.

In addition, there was a problem related to calling

	rpm2cpio | star -xp

which sometimes caused star not to unpack all.

I am not sure whether this is caused by a bug in the rpm commands
or in GNU cpio (creating a cpio archive that is not a multiple
of 512 bytes is illegal too although the logical end may be at any
even byte count). The change in star should workaround this problem
too.


> A valid backup file is created :
>
>   $ star -c /dvdbuffer >/tmp/test.star
>   star: 10004 blocks + 0 bytes (total of 102440960 bytes = 100040.00k).
>
> I spoil a copy by appending 123 bytes :
>
>   $ cp /tmp/test.star /tmp/test_spoiled.star
>   $ dd if=/dev/zero bs=1 count=123 >>/tmp/test_spoiled.star

Why do you do this?

Note that the fix I applied set a hard EOF flag whenever such a
condition accurs. So star (the archiver process) will continue to 
work until the logical EOF is seen of the data ends.

The way I implemented the fix will e.g. prevent you from
being able to continue with multi-volume handling after this
condition did accur.

Jörg

-- 
 EMail:[email protected] (home) Jörg Schilling D-13353 Berlin
       [email protected]		(uni)  
       [email protected]	(work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.