::unpackExtent() honors per-block filter if newer 12-byte b_info

committer: jreiser <jreiser> 1036876078 +0000
This commit is contained in:
John Reiser
2002-11-09 21:07:58 +00:00
parent 33ec757c41
commit 5ac2eed3d9
+10
View File
@@ -360,6 +360,15 @@ void PackLinuxI386elf::unpackExtent(unsigned wanted, OutputFile *fo,
if (sz_cpr < sz_unc)
{
decompress(ibuf+j, ibuf, false);
if (12==szb_info) { // modern per-block filter
if (hdr.b_ftid) {
Filter ft(ph.level); // FIXME: ph.level for b_info?
ft.init(hdr.b_ftid, 0);
ft.cto = hdr.b_cto8;
ft.unfilter(ibuf, sz_unc);
}
}
else { // ancient per-file filter
if (first_PF_X) { // Elf32_Ehdr is never filtered
first_PF_X = false; // but everything else might be
}
@@ -369,6 +378,7 @@ void PackLinuxI386elf::unpackExtent(unsigned wanted, OutputFile *fo,
ft.cto = ph.filter_cto;
ft.unfilter(ibuf, sz_unc);
}
}
j = 0;
}
// update checksum of uncompressed data