aboutsummaryrefslogtreecommitdiff
path: root/bfd/pdp11.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-01-27 11:30:15 +0000
committerNick Clifton <nickc@redhat.com>2015-01-27 11:30:15 +0000
commit37e3922eed415bbedd2dd6e46308fe9e03417770 (patch)
tree8abfb2fd6fcbe0fc85278e378abe890aca1553c1 /bfd/pdp11.c
parent20d79870f35f646e87c43d8c4fee936b4e0ed5a6 (diff)
downloadgdb-37e3922eed415bbedd2dd6e46308fe9e03417770.zip
gdb-37e3922eed415bbedd2dd6e46308fe9e03417770.tar.gz
gdb-37e3922eed415bbedd2dd6e46308fe9e03417770.tar.bz2
Fix memory access violations triggered by running dlltool on corrupt binaries.
PR binutils/17512 * dlltool.c (identify_search_archive): If the last archive was the same as the current archive, terminate the loop. * pdp11.c (aout_get_external_symbols): Return false if there are no symbols.
Diffstat (limited to 'bfd/pdp11.c')
-rw-r--r--bfd/pdp11.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index c559bee..420c9c3 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -1189,6 +1189,9 @@ aout_get_external_symbols (bfd *abfd)
count = exec_hdr (abfd)->a_syms / EXTERNAL_NLIST_SIZE;
+ /* PR 17512: file: 011f5a08. */
+ if (count == 0)
+ return FALSE;
#ifdef USE_MMAP
if (! bfd_get_file_window (abfd, obj_sym_filepos (abfd),
exec_hdr (abfd)->a_syms,