commit | 2deeb7c51020df07d752107cdc6822d70ae1da4e | [log] [tgz] |
---|---|---|
author | Mark Wielaard <mjw@redhat.com> | Sat Nov 22 17:33:05 2014 +0100 |
committer | Mark Wielaard <mjw@redhat.com> | Wed Nov 26 20:12:52 2014 +0100 |
tree | 02375a5709a669a99fb1dfbc2d4d89ee6dab8b74 | |
parent | 9f8c08e68243561a54a09e38fd472b4fc2c17d5d [diff] |
libelf: elf_getphdrnum sanity check the returned phnum result. The internal __elf_getphdrnum_rdlock might return an inconsistent phnum. Return a sanitized value, or return an error to users that rely on phnum to be consistent. That way iterating over all phdrs using elf_getphdr will return consistent results. Signed-off-by: Mark Wielaard <mjw@redhat.com>