diff options
author | Ron Yorston <rmy@pobox.com> | 2012-09-07 11:48:25 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2012-09-07 11:48:25 +0100 |
commit | fecf687cc358883de2da21de33346f0df204c80b (patch) | |
tree | d22c606157926fb659374ae68d55e3a874bacf25 /archival/libarchive | |
parent | b25a7c28a0f684087fa6ccbbc7e265a9cac0f0fa (diff) | |
parent | 6d463de46b418e6c4c8d1397033608f78b33ab21 (diff) | |
download | busybox-w32-fecf687cc358883de2da21de33346f0df204c80b.tar.gz busybox-w32-fecf687cc358883de2da21de33346f0df204c80b.tar.bz2 busybox-w32-fecf687cc358883de2da21de33346f0df204c80b.zip |
Merge branch 'busybox' into merge
Conflicts:
include/libbb.h
shell/ash.c
Diffstat (limited to 'archival/libarchive')
-rw-r--r-- | archival/libarchive/Kbuild.src | 2 | ||||
-rw-r--r-- | archival/libarchive/filter_accept_reject_list.c | 8 | ||||
-rw-r--r-- | archival/libarchive/get_header_tar.c | 8 |
3 files changed, 11 insertions, 7 deletions
diff --git a/archival/libarchive/Kbuild.src b/archival/libarchive/Kbuild.src index e2134be4c..58457fc22 100644 --- a/archival/libarchive/Kbuild.src +++ b/archival/libarchive/Kbuild.src | |||
@@ -45,7 +45,7 @@ lib-$(CONFIG_UNXZ) += decompress_unxz.o | |||
45 | lib-$(CONFIG_CPIO) += get_header_cpio.o | 45 | lib-$(CONFIG_CPIO) += get_header_cpio.o |
46 | lib-$(CONFIG_DPKG) += $(DPKG_FILES) | 46 | lib-$(CONFIG_DPKG) += $(DPKG_FILES) |
47 | lib-$(CONFIG_DPKG_DEB) += $(DPKG_FILES) | 47 | lib-$(CONFIG_DPKG_DEB) += $(DPKG_FILES) |
48 | lib-$(CONFIG_GUNZIP) += decompress_gunzip.o | 48 | lib-$(CONFIG_GUNZIP) += open_transformer.o decompress_gunzip.o |
49 | lib-$(CONFIG_RPM2CPIO) += decompress_gunzip.o get_header_cpio.o | 49 | lib-$(CONFIG_RPM2CPIO) += decompress_gunzip.o get_header_cpio.o |
50 | lib-$(CONFIG_RPM) += open_transformer.o decompress_gunzip.o get_header_cpio.o | 50 | lib-$(CONFIG_RPM) += open_transformer.o decompress_gunzip.o get_header_cpio.o |
51 | lib-$(CONFIG_TAR) += get_header_tar.o | 51 | lib-$(CONFIG_TAR) += get_header_tar.o |
diff --git a/archival/libarchive/filter_accept_reject_list.c b/archival/libarchive/filter_accept_reject_list.c index 39c811337..248374941 100644 --- a/archival/libarchive/filter_accept_reject_list.c +++ b/archival/libarchive/filter_accept_reject_list.c | |||
@@ -24,11 +24,13 @@ char FAST_FUNC filter_accept_reject_list(archive_handle_t *archive_handle) | |||
24 | if (reject_entry) { | 24 | if (reject_entry) { |
25 | return EXIT_FAILURE; | 25 | return EXIT_FAILURE; |
26 | } | 26 | } |
27 | accept_entry = find_list_entry2(archive_handle->accept, key); | ||
28 | 27 | ||
29 | /* Fail if an accept list was specified and the key wasnt in there */ | 28 | /* Fail if an accept list was specified and the key wasnt in there */ |
30 | if ((accept_entry == NULL) && archive_handle->accept) { | 29 | if (archive_handle->accept) { |
31 | return EXIT_FAILURE; | 30 | accept_entry = find_list_entry2(archive_handle->accept, key); |
31 | if (!accept_entry) { | ||
32 | return EXIT_FAILURE; | ||
33 | } | ||
32 | } | 34 | } |
33 | 35 | ||
34 | /* Accepted */ | 36 | /* Accepted */ |
diff --git a/archival/libarchive/get_header_tar.c b/archival/libarchive/get_header_tar.c index 80a709144..bc09756ba 100644 --- a/archival/libarchive/get_header_tar.c +++ b/archival/libarchive/get_header_tar.c | |||
@@ -84,7 +84,7 @@ static unsigned long long getOctal(char *str, int len) | |||
84 | first >>= 1; /* now 7th bit = 6th bit */ | 84 | first >>= 1; /* now 7th bit = 6th bit */ |
85 | v = first; /* sign-extend 8 bits to 64 */ | 85 | v = first; /* sign-extend 8 bits to 64 */ |
86 | while (--len != 0) | 86 | while (--len != 0) |
87 | v = (v << 8) + (unsigned char) *str++; | 87 | v = (v << 8) + (uint8_t) *++str; |
88 | } | 88 | } |
89 | return v; | 89 | return v; |
90 | } | 90 | } |
@@ -452,9 +452,11 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle) | |||
452 | if (cp) | 452 | if (cp) |
453 | *cp = '\0'; | 453 | *cp = '\0'; |
454 | archive_handle->action_data(archive_handle); | 454 | archive_handle->action_data(archive_handle); |
455 | if (archive_handle->accept || archive_handle->reject) | 455 | if (archive_handle->accept || archive_handle->reject |
456 | || (archive_handle->ah_flags & ARCHIVE_REMEMBER_NAMES) | ||
457 | ) { | ||
456 | llist_add_to(&archive_handle->passed, file_header->name); | 458 | llist_add_to(&archive_handle->passed, file_header->name); |
457 | else /* Caller isn't interested in list of unpacked files */ | 459 | } else /* Caller isn't interested in list of unpacked files */ |
458 | free(file_header->name); | 460 | free(file_header->name); |
459 | } else { | 461 | } else { |
460 | data_skip(archive_handle); | 462 | data_skip(archive_handle); |