From 279101d4644c2868f075894a212e9f6c4f6774fb Mon Sep 17 00:00:00 2001 From: John Reiser Date: Fri, 12 May 2023 12:48:25 -0700 Subject: [PATCH] Fix checksum of non-compressible extents https://github.com/upx/upx/issues/673 modified: src/p_unix.cpp --- src/p_unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_unix.cpp b/src/p_unix.cpp index 897a4606..b696e834 100644 --- a/src/p_unix.cpp +++ b/src/p_unix.cpp @@ -396,7 +396,7 @@ void PackUnix::packExtent( ph.c_len = ph.u_len; memcpy(obuf, ibuf, ph.c_len); // must update checksum of compressed data - ph.c_adler = upx_adler32(ibuf, ph.u_len, ph.c_adler); + ph.c_adler = upx_adler32(ibuf, ph.u_len, init_c_adler); } // write block sizes