mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-02-12 18:39:18 +00:00
Merge pull request #3508 from Sonicadvance1/stop_using_vla
ELFParser: Stop using a VLA
This commit is contained in:
commit
32ec4a3c81
@ -146,9 +146,9 @@ struct ELFParser {
|
||||
}
|
||||
|
||||
if (type == ::ELFLoader::ELFContainer::TYPE_X86_32) {
|
||||
Elf32_Phdr phdrs32[ehdr.e_phnum];
|
||||
fextl::vector<Elf32_Phdr> phdrs32(ehdr.e_phnum);
|
||||
|
||||
if (pread(fd, phdrs32, sizeof(Elf32_Phdr) * ehdr.e_phnum, ehdr.e_phoff) == -1) {
|
||||
if (pread(fd, phdrs32.data(), sizeof(Elf32_Phdr) * ehdr.e_phnum, ehdr.e_phoff) == -1) {
|
||||
LogMan::Msg::EFmt("Failed to read phdr32 from '{}'", fd);
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user