bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] multivolume tar and long filenames produce incorrect headers


From: Joan Bertran
Subject: [Bug-tar] multivolume tar and long filenames produce incorrect headers
Date: Fri, 23 Jul 2004 09:27:46 +0200 (MEST)

  When tar has to produce a new volume (gnu tar format) and the file being
split between the previous and the current volume has a long filename the
continuator header is corrupted.
 
  So on the new volume you can find the volume header and the next
"sector/header" is the file continuation header, which has the flag of
 continuation but does not make any use of logfilename flag. And the
filename is ovewritten by the file flags ...
 
When trying to untar those volumes the process complains telling that
"filename ..." is not continued on this volume.
Opening it with an hexadecimal editor shows the header with the filename
truncated by date and system file attributes.

It is possible to recover those corrupted tar volumes with the following
modification
file: "buffer.c"
function: "void flush_read (void)"
line: 774
      if (cursor->header.typeflag != GNUTYPE_MULTIVOL
          || strncmp (cursor->header.name, real_s_name,
sizeof(cursor->header.name) ))
so limiting the comparison to the maximum filename lenght that
can be stored on a normal header.
 
  In case you find it useful I wish to help on fix this, but
- i don't know if adding a "logfilename" header will break the untar process
- some help/hints will be necessary to find out where should it be done
 

-- 
+++ GMX DSL-Tarife 3 Monate gratis* +++ Nur bis 25.7.2004 +++
Bis 24.000 MB oder 300 Freistunden inkl. http://www.gmx.net/de/go/dsl





reply via email to

[Prev in Thread] Current Thread [Next in Thread]