mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 01:50:24 +08:00
PR28422, build_id use-after-free
This fixes a bug in commit 5d9bbb73c1df. All fields preserved from a bfd in struct bfd_preserve need to be cleared in bfd_reinit. PR 28422 * format.c (bfd_reinit): Clear build_id.
This commit is contained in:
@ -151,6 +151,7 @@ bfd_reinit (bfd *abfd, unsigned int section_id, bfd_cleanup cleanup)
|
||||
abfd->tdata.any = NULL;
|
||||
abfd->arch_info = &bfd_default_arch_struct;
|
||||
abfd->flags &= BFD_FLAGS_SAVED;
|
||||
abfd->build_id = NULL;
|
||||
bfd_section_list_clear (abfd);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user