Fix illegal memory access problems with readelf processing corrupt RL78 binaries.
authorNick Clifton <nickc@redhat.com>
Tue, 14 Feb 2017 13:24:09 +0000 (13:24 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 14 Feb 2017 13:24:09 +0000 (13:24 +0000)
commitb32e566ba6ee02687c6def22ade0899076adf7dd
tree1523a3aea8acafb835455833fa07e867aaf4e091
parent7e0de605cbacbbbb2531bb70506c0843aea13111
Fix illegal memory access problems with readelf processing corrupt RL78 binaries.

PR binutils/21155
* readelf.c (IN_RANGE): New macro.  Tests for an address + offset
being within a given range.
(target_specific_reloc_handling): Use macro to test for underflow
as well as overflow of reloc offset.
binutils/ChangeLog
binutils/readelf.c