Hi!

Debian's tar-1.16 version does have a bug which I triggered like this
on a GNU/Linux PC:

  * mkdir testdir
  * touch 'testdir/strange [ ] ? file'
  * mount -t vfat /dev/usb-stick /mnt/usb-stick
  * tar cpf - testdir | ( cd /mnt/usb-stick && tar xpf -;)

Linux' vfat filesystem driver refuses to create files containing '?',
'[' or ']' and returns -EINVAL.

GNU tar signals the open() error and prints a message like "skipping
to next header", but with my (real 16 GB) copy, "skipping to next
header" looked like "skipping to end of archive."  Finally, only half
of the data was copied.

Easy solution:  Call skip_member() in the error path as it is done in
a different case.  Copyright assignment with FSF is in place
(initially filed for binutils/gcc/glibc).

Please Cc: me, because I'm not subscribed.

Thanks,
        Jan-Benedict Glaw

--- tar-1.16/src/extract.c~     2006-11-28 23:21:47.000000000 +0100
+++ tar-1.16/src/extract.c      2006-11-28 23:22:07.000000000 +0100
@@ -751,6 +751,7 @@
       if (fd < 0)
        {
          open_error (file_name);
+         skip_member ();
          return 1;
        }
     }

-- 
      Jan-Benedict Glaw      [EMAIL PROTECTED]              +49-172-7608481
Signature of:                http://catb.org/~esr/faqs/smart-questions.html
the second  :

Attachment: signature.asc
Description: Digital signature

Reply via email to