aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox/0001-unzip-fix-regression-on-big-endian-machines.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/busybox/0001-unzip-fix-regression-on-big-endian-machines.patch')
-rw-r--r--main/busybox/0001-unzip-fix-regression-on-big-endian-machines.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/main/busybox/0001-unzip-fix-regression-on-big-endian-machines.patch b/main/busybox/0001-unzip-fix-regression-on-big-endian-machines.patch
new file mode 100644
index 0000000000..e0307430cf
--- /dev/null
+++ b/main/busybox/0001-unzip-fix-regression-on-big-endian-machines.patch
@@ -0,0 +1,31 @@
+From 32ba988add53a003cf086ac660809f2a33a55b02 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 25 Jul 2017 20:38:18 +0200
+Subject: [PATCH] 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>
+---
+ archival/unzip.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/archival/unzip.c b/archival/unzip.c
+index bb39d954e..8ed9ae7d5 100644
+--- a/archival/unzip.c
++++ b/archival/unzip.c
+@@ -114,6 +114,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 ); \
+--
+2.13.2
+