Fix issue with reading ELF header

This commit is contained in:
EnderIce2 2024-02-01 20:31:49 +02:00
parent 053e167002
commit fa6779b8c7
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -141,6 +141,7 @@ namespace Execute
}
Elf64_Ehdr ELFHeader;
lseek(fd, 0, SEEK_SET);
fread(fd, (uint8_t *)&ELFHeader, sizeof(Elf64_Ehdr));
uintptr_t EntryPoint = ELFHeader.e_entry;
debug("Entry point is %#lx", EntryPoint);
@ -383,6 +384,7 @@ namespace Execute
}
Elf64_Ehdr ELFHeader;
lseek(fd, 0, SEEK_SET);
fread(fd, (uint8_t *)&ELFHeader, sizeof(Elf64_Ehdr));
uintptr_t EntryPoint = ELFHeader.e_entry;
debug("Entry point is %#lx", EntryPoint);