Rbin ELF plugin r_bin_elf_resize_section was not resizing the elf (#11715)

segment the section resides in.
I beleive this fixes it
This commit is contained in:
wdworks 2018-10-03 03:14:09 +03:00 committed by radare
parent 72ae29dd67
commit 237e6c2947

View File

@ -140,7 +140,10 @@ ut64 Elf_(r_bin_elf_resize_section)(struct Elf_(r_bin_elf_obj_t) *bin, const cha
if (phdrp->p_paddr) {
phdrp->p_paddr += delta;
}
}
} else if (phdrp->p_offset + phdrp->p_filesz >= rsz_offset + rsz_osize) {
phdrp->p_filesz += delta;
phdrp->p_memsz += delta;
}
off = ehdr->e_phoff + i * sizeof (Elf_(Phdr));
if (r_buf_write_at (bin->b, off, (ut8 *)phdrp, sizeof (Elf_ (Phdr))) == -1) {
perror ("write (phdr)");