mirror of
https://github.com/bminor/binutils-gdb.git
synced 2026-02-04 12:11:31 +00:00
PR28422, build_id use-after-free
This fixes a bug in commit5d9bbb73c1. 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. (cherry picked from commit6d661cdc5b)
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