From adc772a5f2b5b74f398aaa59c36739fee4ee7a85 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 20 Jul 2008 17:10:43 +0000 Subject: tar: fix handling of tarballs with symlinks with size field != 0 --- testsuite/tar/tar_with_link_with_size | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 testsuite/tar/tar_with_link_with_size (limited to 'testsuite/tar') diff --git a/testsuite/tar/tar_with_link_with_size b/testsuite/tar/tar_with_link_with_size new file mode 100644 index 0000000..40454f2 --- /dev/null +++ b/testsuite/tar/tar_with_link_with_size @@ -0,0 +1,27 @@ +# This tarball contains a softlink with size field != 0. +# If not ignored, it makes hext header to be skipped +# and data to be read as a header. +# GNU tar 1.15.1 has a bug here: tf won't work, but xf will. +tar1_bz2() +{ + $ECHO -ne "\x42\x5a\x68\x39\x31\x41\x59\x26\x53\x59\x14\x44\xe3\xdd\x00\x00" + $ECHO -ne "\x9a\xfb\x90\xca\x18\x00\xc0\x40\x03\xff\x80\x08\x00\x7b\xe3\xff" + $ECHO -ne "\x80\x04\x00\x00\x08\x30\x00\xd6\xb3\x09\x45\x19\x0d\x0d\x41\x84" + $ECHO -ne "\x1a\x68\xd0\x7a\x99\x90\x4a\x0a\x6d\x4c\xa3\x20\x7a\x41\xa0\x00" + $ECHO -ne "\x00\x55\x25\x34\x1a\x34\xd0\x00\x64\x64\x1a\x32\x3f\x76\x3c\x1c" + $ECHO -ne "\xd3\x3c\xa0\x84\x9b\x88\x05\x70\x90\xbb\x18\x28\x39\x29\xb3\x30" + $ECHO -ne "\xa8\x0a\x21\x70\x0c\x01\x32\x3b\xbe\xde\xd7\x13\x2e\xbd\x2a\x9c" + $ECHO -ne "\xa8\x42\x2a\x91\x15\xe2\xa1\xcd\x24\x37\x9c\x91\xaa\xc7\x14\xdb" + $ECHO -ne "\x4c\x08\xaa\xaf\x12\xeb\x6c\x37\x96\xb0\xa4\x25\x0c\xb4\x4b\xc5" + $ECHO -ne "\x52\x70\x3b\x25\x4c\x0e\x46\x67\x51\x54\x89\x13\x13\xf0\xa8\xe9" + $ECHO -ne "\x68\x4e\x8c\x81\xfc\x79\xe0\xb0\xd8\x79\x34\x94\x71\xa2\x0c\xbe" + $ECHO -ne "\x93\x61\x82\x95\x10\x88\xd1\xa6\x69\xaa\x38\x9c\xb6\xc2\xb2\x94" + $ECHO -ne "\x90\xc3\x82\x29\xe8\x8c\xb8\x95\x83\x32\x40\x61\x11\x11\xd3\xaa" + $ECHO -ne "\x3f\x8b\xb9\x22\x9c\x28\x48\x0a\x22\x71\xee\x80" +} +res1="\ +lrwxrwxrwx user/group 0 2008-07-19 15:02:37 firmware-372/sources/native/bin/chroot-setup.sh -> qemu-setup.sh +-rwxr-xr-x user/group 512 2008-07-19 15:02:37 firmware-372/sources/native/bin/qemu-setup.sh" + +t=`tar1_bz2 | bunzip2 | busybox tar tvf -` +test x"$res1" = x"$t" -- cgit v1.1