mirror of
https://github.com/upx/upx
synced 2025-10-05 19:20:23 +08:00
::packExtent updates ph.u_adler to satisfy verifyOverlappingDecompression()
even when 0==hdr_u_len
This commit is contained in:
parent
549c59ecf5
commit
405abc4e95
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user