PR28403, null pointer dereference in disassemble_bytes
authorAlan Modra <amodra@gmail.com>
Tue, 5 Oct 2021 23:47:29 +0000 (10:17 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 6 Oct 2021 00:54:29 +0000 (11:24 +1030)
commit0a6041ce9383338fa62acb207683780faaa8b42c
tree1996d2e58fac46ae1ed3ea5366571d7c9223f88e
parent55e3926e79937da55da3eaad3b15b4c099071976
PR28403, null pointer dereference in disassemble_bytes

Indexing of symbol and howto arrays wasn't checked in aout targets.

PR 28403
* aout-ns32k.c (MY (reloc_howto)): Sanity check howto_table index.
Make r_index unsigned.
(MY_swap_std_reloc_in): Make r_index unsigned.
* aoutx.h (MOVE_ADDRESS): Sanity check symbol r_index.
(aout_link_input_section_std): Make r_index unsigned.
(aout_link_input_section_ext): Likewise.
* i386lynx.c (MOVE_ADDRESS): Sanity check symbol r_index.
(swap_ext_reloc_in, swap_std_reloc_in): Make r_index unsigned.
* pdp11.c (MOVE_ADDRESS): Sanity check symbol r_index.
bfd/aout-ns32k.c
bfd/aoutx.h
bfd/i386lynx.c
bfd/pdp11.c