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

[email protected]
Newsgroups gmane.comp.archivers.star.user
Message-ID <[email protected]>
Hi Joerg,

i encounter problems with reading star archives after
having added small amounts of trailing garbage to them.
With tails of more than 1 kB it seems to be ok.


  $ star -version
  star: star 1.5a64 (i686-pc-linux-gnu)
(so if this is solved in star-1.5a65pre, sorry)

The archive got written with (command logged by set -x)
  + star -c list=-
  star: 15 blocks + 0 bytes (total of 153600 bytes = 150.00k).

and i added my personal garbage tail
  Note: cd_backup_planer added 320 bytes of checksum padding

On trying to read the table of content
  $ star -t -v </tmp/test2.star
i get _half_ my content list and then star aborts
  ...
      0 lrwxrwxrwx  root/root Jun 12 20:40 2004 lenghty_address
  star: Error reading '-' size (320) too small.
  star: 15 blocks + 0 bytes (total of 153600 bytes = 150.00k).


The problem with reading the archive could be solved by :
  $ dd bs=1024 count=150 if=/tmp/test2.star | star -t -v
  ...
     6997 -rwx------  thomas/thomas Aug 18 10:57 2005 other_lenghty_address
  star: 15 blocks + 0 bytes (total of 153600 bytes = 150.00k).

Obviously my tail violates your blocking assumptions.


I did not experience this with previous tests of my star
based formatter script, probably because those tests produced
larger archives and a longer garbage tail from my own efforts.
  ...
  star: 12959 blocks + 0 bytes (total of 132700160 bytes = 129590.00k).
  Note: cd_backup_planer added 32681 bytes of checksum padding
  ...
  $ star -t -v </tmp/test2.star >/dev/null
  star: 12962 blocks + 1961 bytes (total of 132732841 bytes = 129621.91k).

It seems to cope nicely with odd numbers as long as they are
large enough.


A test with a smaller tail format for the same archive size
  star: 12959 blocks + 0 bytes (total of 132700160 bytes = 129590.00k).
  Note: cd_backup_planer added 135 bytes of checksum padding
  $ star -t -v </tmp/test2.star >/dev/null
  star: Error reading '-' size (135) too small.
  star: 12959 blocks + 0 bytes (total of 132700160 bytes = 129590.00k).

A bold repair attempt by adding more garbage
  $ dd if=/dev/zero bs=1024 count=1 >>/tmp/test2.star
  $ star -t -v </tmp/test2.star >/dev/null
  star: 12959 blocks + 1159 bytes (total of 132701319 bytes = 129591.13k).


So i hope, the behavior with small garbage tails is not
intentional and may be brought towards the behavior with
larger tails.
The tails are for detecting blind burner lenses and 
mouldy media. Usually they make no problems when appended
to archive formats or filesystem images.

I will work around this effect (for older star versions)
by adding that extra kB to any archive (between its end 
and my tail).
It seems to help but a short confirmation that this is 
indeed sufficient would be welcome.


Have a nice day :)

Thomas
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.