[git commit branch/1_27_stable] unzip: fix regression on big-endian machines
Denys Vlasenko
vda.linux at googlemail.com
Fri Aug 4 12:54:16 UTC 2017
commit: https://git.busybox.net/busybox/commit/?id=4989d05174efd267d2fd85dc2e7f7beaafb8ab37
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/1_27_stable
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 at alpinelinux.org>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
archival/unzip.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/archival/unzip.c b/archival/unzip.c
index 5102552..9037262 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 ); \
More information about the busybox-cvs
mailing list