From 972b670a64f66473d16711a401af4328f5dc341a Mon Sep 17 00:00:00 2001 From: John Reiser Date: Sat, 6 Jun 2020 17:11:32 -0700 Subject: [PATCH] Set .b_extra for hdr, especially for Mach-o for 'go'. https://github.com/upx/upx/issues/222 modified: p_unix.cpp --- src/p_unix.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/p_unix.cpp b/src/p_unix.cpp index be9b45ca..336e2e58 100644 --- a/src/p_unix.cpp +++ b/src/p_unix.cpp @@ -409,6 +409,7 @@ void PackUnix::packExtent( set_te32(&tmp.sz_unc, hdr_u_len); set_te32(&tmp.sz_cpr, hdr_c_len); tmp.b_method = (unsigned char) ph.method; + tmp.b_extra = b_extra; fo->write(&tmp, sizeof(tmp)); b_len += sizeof(b_info); fo->write(hdr_obuf, hdr_c_len);