Fix up some more issues with Waterbox and 0 size elf data (#3590)
This commit is contained in:
parent
480b51b274
commit
64512851fe
Binary file not shown.
Binary file not shown.
|
@ -148,7 +148,11 @@ impl ElfLoader {
|
|||
if prot_addr.size != 0 {
|
||||
// TODO: Using no_replace false here because the linker puts eh_frame_hdr in a separate segment that overlaps the other RO segment???
|
||||
b.mmap_fixed(prot_addr, Protection::RW, false)?;
|
||||
b.copy_from_external(&data[segment.file_range()], addr.start)?;
|
||||
|
||||
let src_data = &data[segment.file_range()];
|
||||
if src_data.len() != 0 {
|
||||
b.copy_from_external(src_data, addr.start)?;
|
||||
}
|
||||
b.mprotect(prot_addr, prot)?;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue