::unpackExtent() honors per-block filter if newer 12-byte b_info
committer: jreiser <jreiser> 1036876078 +0000
This commit is contained in:
@@ -360,6 +360,15 @@ void PackLinuxI386elf::unpackExtent(unsigned wanted, OutputFile *fo,
|
|||||||
if (sz_cpr < sz_unc)
|
if (sz_cpr < sz_unc)
|
||||||
{
|
{
|
||||||
decompress(ibuf+j, ibuf, false);
|
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
|
if (first_PF_X) { // Elf32_Ehdr is never filtered
|
||||||
first_PF_X = false; // but everything else might be
|
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.cto = ph.filter_cto;
|
||||||
ft.unfilter(ibuf, sz_unc);
|
ft.unfilter(ibuf, sz_unc);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
j = 0;
|
j = 0;
|
||||||
}
|
}
|
||||||
// update checksum of uncompressed data
|
// update checksum of uncompressed data
|
||||||
|
|||||||
Reference in New Issue
Block a user