mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 10:03:47 +08: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:
parent
163d807743
commit
a281816c8a
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user