Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-07-25 21:44:50 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-04 15:54:16 +0300
commit4989d05174efd267d2fd85dc2e7f7beaafb8ab37 (patch)
tree6bc26828c24061645d559f15c2cb5f408f55c7a1
parent21e5d0f841cfb1bee8751983c9a2bd199ec9eb75 (diff)
unzip: fix regression on big-endian machines
This fixes a regression which was introduced with commit 2a0867a5 ("unzip: optional support for bzip2 and lzma") and causes unzip to exit with error when extracting archives: unzip: unsupported method 2048 Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--archival/unzip.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/archival/unzip.c b/archival/unzip.c
index 51025529d..9037262e3 100644
--- a/archival/unzip.c
+++ b/archival/unzip.c
@@ -113,6 +113,7 @@ typedef union {
#define FIX_ENDIANNESS_ZIP(zip) \
do { if (BB_BIG_ENDIAN) { \
+ (zip).fmt.method = SWAP_LE16((zip).fmt.method ); \
(zip).fmt.crc32 = SWAP_LE32((zip).fmt.crc32 ); \
(zip).fmt.cmpsize = SWAP_LE32((zip).fmt.cmpsize ); \
(zip).fmt.ucmpsize = SWAP_LE32((zip).fmt.ucmpsize ); \