aboutsummaryrefslogtreecommitdiffstats
path: root/package/busybox/patches/902-tar.patch
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2008-08-20 14:00:34 +0000
committerImre Kaloz <kaloz@openwrt.org>2008-08-20 14:00:34 +0000
commit1e82faaa5e835b00676421b1c63bef541f8ca0d3 (patch)
treeabda8ea9d70f7d10c897cf214028b9037b17f784 /package/busybox/patches/902-tar.patch
parente3d9bc5779a012df82e2c48af3bef81bb011257a (diff)
downloadupstream-1e82faaa5e835b00676421b1c63bef541f8ca0d3.tar.gz
upstream-1e82faaa5e835b00676421b1c63bef541f8ca0d3.tar.bz2
upstream-1e82faaa5e835b00676421b1c63bef541f8ca0d3.zip
upgrade busybox to v1.11.1 and add current upstream fixes
SVN-Revision: 12348
Diffstat (limited to 'package/busybox/patches/902-tar.patch')
-rw-r--r--package/busybox/patches/902-tar.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/package/busybox/patches/902-tar.patch b/package/busybox/patches/902-tar.patch
new file mode 100644
index 0000000000..d9bf7cd0c6
--- /dev/null
+++ b/package/busybox/patches/902-tar.patch
@@ -0,0 +1,55 @@
+--- a/archival/libunarchive/get_header_tar.c
++++ b/archival/libunarchive/get_header_tar.c
+@@ -261,26 +261,33 @@
+ case '0':
+ #if ENABLE_FEATURE_TAR_OLDGNU_COMPATIBILITY
+ if (last_char_is(file_header->name, '/')) {
+- file_header->mode |= S_IFDIR;
+- } else
++ goto set_dir;
++ }
+ #endif
+ file_header->mode |= S_IFREG;
+ break;
+ case '2':
+ file_header->mode |= S_IFLNK;
++ /* have seen tarballs with size field containing
++ * the size of the link target's name */
++ size0:
++ file_header->size = 0;
+ break;
+ case '3':
+ file_header->mode |= S_IFCHR;
+- break;
++ goto size0; /* paranoia */
+ case '4':
+ file_header->mode |= S_IFBLK;
+- break;
++ goto size0;
+ case '5':
++#if ENABLE_FEATURE_TAR_OLDGNU_COMPATIBILITY
++ set_dir:
++#endif
+ file_header->mode |= S_IFDIR;
+- break;
++ goto size0;
+ case '6':
+ file_header->mode |= S_IFIFO;
+- break;
++ goto size0;
+ #if ENABLE_FEATURE_TAR_GNU_EXTENSIONS
+ case 'L':
+ /* free: paranoia: tar with several consecutive longnames */
+--- a/archival/libunarchive/seek_by_jump.c
++++ b/archival/libunarchive/seek_by_jump.c
+@@ -8,7 +8,9 @@
+
+ void seek_by_jump(const archive_handle_t *archive_handle, unsigned amount)
+ {
+- if (lseek(archive_handle->src_fd, (off_t) amount, SEEK_CUR) == (off_t) -1) {
++ if (amount
++ && lseek(archive_handle->src_fd, (off_t) amount, SEEK_CUR) == (off_t) -1
++ ) {
+ if (errno == ESPIPE)
+ seek_by_read(archive_handle, amount);
+ else