From: Mark Harmstone Date: Fri, 9 Dec 2022 01:52:33 +0000 (+0000) Subject: ld: Fix segfault in populate_publics_stream X-Git-Tag: binutils-2_40~139 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8b182dc3c6e7f763504c0f0e9cf699da36d499dd;p=thirdparty%2Fbinutils-gdb.git ld: Fix segfault in populate_publics_stream --- diff --git a/ld/pdb.c b/ld/pdb.c index 44ba21f2b46..45c933e080a 100644 --- a/ld/pdb.c +++ b/ld/pdb.c @@ -1411,6 +1411,9 @@ populate_publics_stream (bfd *stream, bfd *abfd, bfd *sym_rec_stream) for (bfd *in = coff_data (abfd)->link_info->input_bfds; in; in = in->link.next) { + if (!in->outsymbols) + continue; + for (unsigned int i = 0; i < in->symcount; i++) { struct bfd_symbol *sym = in->outsymbols[i];