1
0
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:
Markus F.X.J. Oberhumer 2006-11-21 18:42:38 +01:00
parent 4be3d79e12
commit ba4a686d1c
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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"