mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 01:53:38 +08:00
Segfault in _bfd_delete_bfd with USE_MMAP
Any of the calls to _bfd_delete_bfd in bfd_fopen will hit this. * opncls.c (_bfd_delete_bfd): Check for non-NULL xvec before accessing flavour.
This commit is contained in:
parent
f8e9374ea8
commit
ea3002bc4d
@ -164,7 +164,8 @@ static void
|
||||
_bfd_delete_bfd (bfd *abfd)
|
||||
{
|
||||
#ifdef USE_MMAP
|
||||
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
|
||||
if (abfd->xvec
|
||||
&& abfd->xvec->flavour == bfd_target_elf_flavour)
|
||||
{
|
||||
asection *sec;
|
||||
for (sec = abfd->sections; sec != NULL; sec = sec->next)
|
||||
|
Loading…
Reference in New Issue
Block a user