]> git.ipfire.org Git - thirdparty/elfutils.git/commit
readelf: Fix off by one sanity check in handle_gnu_hash.
authorMark Wielaard <mark@klomp.org>
Fri, 24 Mar 2017 11:15:02 +0000 (12:15 +0100)
committerMark Wielaard <mark@klomp.org>
Mon, 3 Apr 2017 21:40:41 +0000 (23:40 +0200)
commit9d84fdd78705d7a1b9947a9f4ca77fbccdd76d4a
tree5e9f4663a68cb18965acf8ba2abcc1f20c9a190a
parent93c51144c3f664d4e9709da75a1d0fa00ea0fe95
readelf: Fix off by one sanity check in handle_gnu_hash.

We sanity check to make sure we don't index outside the chain array
by testing inner > max_nsyms. But inner is a zero-based index, while
max_nsyms is the maximum number. Change the check to inner >= max_nsyms.

https://sourceware.org/bugzilla/show_bug.cgi?id=21299

Signed-off-by: Mark Wielaard <mark@klomp.org>
src/ChangeLog
src/readelf.c