PowerPC, sanity check r_offset in relocate_section
authorAlan Modra <amodra@gmail.com>
Thu, 9 Sep 2021 01:29:24 +0000 (10:59 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 10 Sep 2021 08:34:18 +0000 (18:04 +0930)
commite7776f52fedcafc63619abb2928151cf5bbfcce2
tree98dde7dad116279f7940c348ca6ffeb419e67f52
parent9f81b99e2426d19760c20c07f8cd3ae5cd85e8df
PowerPC, sanity check r_offset in relocate_section

        * elf32-ppc.c (offset_in_range): New function.
(ppc_elf_vle_split16): Sanity check r_offset before accessing
section contents.  Return status.
        (ppc_elf_relocate_section): Sanity check r_offset before
        accessing section contents.  Don't segfault on NULL howto.
bfd/elf32-ppc.c