star-1.5a64 aborts on reading archives with _small_ garbage tails
| Newsgroups | gmane.comp.archivers.star.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, > 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. My test in detail : Although the complaint is only about my surplus bytes, sometimes there remained some smaller files and a part of a large file unrestored. But not always. Often the restore is complete despite the error message. Out of 9 tries, two delivered a damaged restore and 7 were flawless. All 9 aborted, of course. From the error message (of the FIFO ?) i understand that all but my final 123 bytes were accepted on read. Under some circumstances a tail of accepted data seems not to be processed by the unpacker. (With star -t these circumstances seem to be the normal case.) 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 I restore that copy $ star -x </tmp/test_spoiled.star star: WARNING: skipping leading '/' on filenames. star: Error reading '-' size (123) too small. star: 10004 blocks + 0 bytes (total of 102440960 bytes = 100040.00k). Try #2 and #9 out of 9 did not restore properly : $ diff -q -r /dvdbuffer dvdbuffer Only in /dvdbuffer: split_dir Files /dvdbuffer/test/ext2_loop_fs and dvdbuffer/test/ext2_loop_fs differ Only in /dvdbuffer: xdir The file ext2_loop_fs has 102400000 bytes in original and 102018048 in the second damaged try (381952 missing). With seven other tries the restore was ok. $ diff -q -r /dvdbuffer dvdbuffer $ Have a nice day :) Thomas