From: Alan Modra Date: Tue, 27 Sep 2022 23:52:43 +0000 (+0930) Subject: asan: segv in _bfd_archive_close_and_cleanup X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=540e53422cd8916b85d43060210251132fba8548;p=binutils-gdb.git asan: segv in _bfd_archive_close_and_cleanup Uninitialised arelt_data->parent_cache led to this segv. * pdb.c (pdb_get_elt_at_index): Clear arelt_data. --- diff --git a/bfd/pdb.c b/bfd/pdb.c index 14e1049d03c..5d72797c298 100644 --- a/bfd/pdb.c +++ b/bfd/pdb.c @@ -193,7 +193,7 @@ pdb_get_elt_at_index (bfd *abfd, symindex sym_index) goto fail; file->arelt_data = - (struct areltdata *) bfd_malloc (sizeof (struct areltdata)); + (struct areltdata *) bfd_zmalloc (sizeof (struct areltdata)); if (!file->arelt_data) goto fail;