PR25018, readelf crash on 32bits
authorAlan Modra <amodra@gmail.com>
Sun, 22 Sep 2019 23:23:07 +0000 (08:53 +0930)
committerAlan Modra <amodra@gmail.com>
Sun, 22 Sep 2019 23:34:54 +0000 (09:04 +0930)
commitb3fe587ed2c78d46132bd33e14f42449d410354b
treea7e3e2a9c209320816c2c587550fddaff1a50f6a
parenta13ba30840ba7a8450dcb4edd356de61fcb89130
PR25018, readelf crash on 32bits

Pointer comparisons after adding an offset just don't work to catch
overflow when the offset is a larger type than the pointer.

PR 25018
* dwarf.c (get_type_signedness): Delete ineffective pointer
comparison check.  Properly range check uvalue offset on
recursive call.
(read_and_display_attr_value): Range check uvalue offset before
calling get_type_signedness.
binutils/ChangeLog
binutils/dwarf.c