]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - bfd/reloc.c
PR21432, buffer overflow in perform_relocation
authorAlan Modra <amodra@gmail.com>
Sat, 29 Apr 2017 05:18:16 +0000 (14:48 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 29 Apr 2017 09:29:37 +0000 (18:59 +0930)
commita941291cab71b9ac356e1c03968c177c03e602ab
treed65e215e50c613debf66d04caedaef757d4d2839
parent45ce1b47e4490993b5c1a04f4a8acb62d9ec5039
PR21432, buffer overflow in perform_relocation

The existing reloc offset range tests didn't catch small negative
offsets less than the size of the reloc field.

PR 21432
* reloc.c (reloc_offset_in_range): New function.
(bfd_perform_relocation, bfd_install_relocation): Use it.
(_bfd_final_link_relocate): Likewise.
bfd/ChangeLog
bfd/reloc.c