reassign woody pointers after codecave creation
This commit is contained in:
parent
11bbe38aa4
commit
2c4bdfeeec
|
@ -74,6 +74,9 @@ size_t create_codecave(t_efl_content *woody, Elf64_Phdr *load_segment)
|
||||||
munmap(woody->file, woody->file_size);
|
munmap(woody->file, woody->file_size);
|
||||||
woody->file = new_woody;
|
woody->file = new_woody;
|
||||||
woody->file_size += padding_size;
|
woody->file_size += padding_size;
|
||||||
|
woody->Ehdr = (Elf64_Ehdr *)new_woody;
|
||||||
|
woody->Phdr = (Elf64_Phdr *)fetch(woody->file, woody->file_size, woody->Ehdr->e_phoff, sizeof(Elf64_Phdr));
|
||||||
|
woody->Shdr = (Elf64_Shdr *)fetch(woody->file, woody->file_size, woody->Ehdr->e_shoff, sizeof(Elf64_Shdr));
|
||||||
return codecave_start;
|
return codecave_start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue