Revert PackLinuxElf32::unpack() for decompression of armeb-linux.elf/upx-3.91
Conflicting with https://github.com/upx/upx/issues/73 modified: p_lx_elf.cpp
This commit is contained in:
+1
-1
@@ -4169,6 +4169,7 @@ void PackLinuxElf32::unpack(OutputFile *fo)
|
|||||||
|| ph.u_len > sizeof(u))
|
|| ph.u_len > sizeof(u))
|
||||||
throwCantUnpack("b_info corrupted");
|
throwCantUnpack("b_info corrupted");
|
||||||
ph.filter_cto = bhdr.b_cto8;
|
ph.filter_cto = bhdr.b_cto8;
|
||||||
|
bool const is_shlib = (ehdr->e_entry==0) || (ehdr->e_shoff!=0);
|
||||||
|
|
||||||
// Peek at resulting Ehdr and Phdrs for use in controlling unpacking.
|
// Peek at resulting Ehdr and Phdrs for use in controlling unpacking.
|
||||||
// Uncompress an extra time, and don't verify or update checksums.
|
// Uncompress an extra time, and don't verify or update checksums.
|
||||||
@@ -4184,7 +4185,6 @@ void PackLinuxElf32::unpack(OutputFile *fo)
|
|||||||
// check EI_MAG[0-3], EI_CLASS, EI_DATA, EI_VERSION
|
// check EI_MAG[0-3], EI_CLASS, EI_DATA, EI_VERSION
|
||||||
|| memcmp(ehdr->e_ident, ehdri.e_ident, Elf32_Ehdr::EI_OSABI))
|
|| memcmp(ehdr->e_ident, ehdri.e_ident, Elf32_Ehdr::EI_OSABI))
|
||||||
throwCantUnpack("ElfXX_Ehdr corrupted");
|
throwCantUnpack("ElfXX_Ehdr corrupted");
|
||||||
bool const is_shlib = (ehdr->e_entry==0) || (ehdr->e_shoff!=0);
|
|
||||||
|
|
||||||
fi->seek(- (off_t) (szb_info + ph.c_len), SEEK_CUR);
|
fi->seek(- (off_t) (szb_info + ph.c_len), SEEK_CUR);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user