[git commit] unzip -l: add missed big-endian conversions date and time

Denys Vlasenko vda.linux at googlemail.com
Tue Nov 29 13:44:39 UTC 2022


commit: https://git.busybox.net/busybox/commit/?id=7ade421b1a410f4d2d2314f06d7f5a9d0fd123ec
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

When calling unzip -l the date and time output was missing big-endian
conversions.

Signed-off-by: Peter Kaestle <peter.kaestle at nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 archival/unzip.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/archival/unzip.c b/archival/unzip.c
index fc92ac661..b27dd2187 100644
--- a/archival/unzip.c
+++ b/archival/unzip.c
@@ -118,6 +118,8 @@ typedef union {
 #define FIX_ENDIANNESS_ZIP(zip) \
 do { if (BB_BIG_ENDIAN) { \
 	(zip).fmt.method        = SWAP_LE16((zip).fmt.method      ); \
+	(zip).fmt.modtime       = SWAP_LE16((zip).fmt.modtime     ); \
+	(zip).fmt.moddate       = SWAP_LE16((zip).fmt.moddate     ); \
 	(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