PR21990, Integer overflow in process_version_sections
authorAlan Modra <amodra@gmail.com>
Wed, 23 Aug 2017 06:12:12 +0000 (15:42 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 23 Aug 2017 10:17:29 +0000 (19:47 +0930)
commit452bf675ea772002aa86fb1d28f3474da70ee1de
tree821219936878e06cb9c02af055de728a862efb15
parent58afddc6c7c5eaacdb68cdc3cacd0f76a3d01490
PR21990, Integer overflow in process_version_sections

This tidies some of the overflow checking when processing verneed
and verdef sections.

PR 21990
* readelf.c (process_version_sections <SHT_GNU_verneed>): Check
for invalid vn_next field before adding to idx.  Use unsigned
long for index vars.  Move index checks.
<SHT_GNU_verdef>: Likewise for vd_next.
binutils/ChangeLog
binutils/readelf.c