mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
Fix endian issue in execve formats.
This commit is contained in:
parent
4be3d79e12
commit
ba4a686d1c
|
@ -450,7 +450,7 @@ int PackLinuxI386::getLoaderPrefixSize() const
|
|||
**************************************************************************/
|
||||
|
||||
// basic check of an Linux ELF Ehdr
|
||||
int PackLinuxI386::checkEhdr(const Elf32_Ehdr *ehdr) const
|
||||
int PackLinuxI386::checkEhdr(const Elf_LE32_Ehdr *ehdr) const
|
||||
{
|
||||
const unsigned char * const buf = ehdr->e_ident;
|
||||
|
||||
|
@ -500,7 +500,7 @@ bool PackLinuxI386::canPack()
|
|||
if (exetype != 0)
|
||||
return super::canPack();
|
||||
|
||||
Elf32_Ehdr ehdr;
|
||||
Elf_LE32_Ehdr ehdr;
|
||||
unsigned char *buf = ehdr.e_ident;
|
||||
|
||||
fi->seek(0, SEEK_SET);
|
||||
|
|
|
@ -78,7 +78,7 @@ protected:
|
|||
virtual void updateLoader(OutputFile *);
|
||||
|
||||
// ELF util
|
||||
virtual int checkEhdr(const Elf32_Ehdr *ehdr) const;
|
||||
virtual int checkEhdr(const Elf_LE32_Ehdr *ehdr) const;
|
||||
|
||||
enum {
|
||||
UPX_ELF_MAGIC = 0x5850557f // "\x7fUPX"
|
||||
|
|
Loading…
Reference in New Issue
Block a user