1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

::packExtent updates ph.u_adler to satisfy verifyOverlappingDecompression()

even when 0==hdr_u_len
This commit is contained in:
John Reiser 2009-10-14 17:47:02 -07:00
parent 549c59ecf5
commit 405abc4e95

View File

@ -412,6 +412,9 @@ void PackUnix::packExtent(
fo->write(&tmp, sizeof(tmp));
b_len += sizeof(b_info);
if (ft) {
ph.u_adler = end_u_adler;
}
// write compressed data
if (ph.c_len < ph.u_len) {
fo->write(obuf, ph.c_len);
@ -422,9 +425,6 @@ void PackUnix::packExtent(
fo->write(ibuf, ph.u_len);
}
if (ft) {
ph.u_adler = end_u_adler;
}
total_in += ph.u_len;
total_out += ph.c_len;
}