]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libelf: elf_getphdrnum sanity check the returned phnum result.
authorMark Wielaard <mjw@redhat.com>
Sat, 22 Nov 2014 16:33:05 +0000 (17:33 +0100)
committerMark Wielaard <mjw@redhat.com>
Wed, 26 Nov 2014 19:12:52 +0000 (20:12 +0100)
commit2deeb7c51020df07d752107cdc6822d70ae1da4e
tree02375a5709a669a99fb1dfbc2d4d89ee6dab8b74
parent9f8c08e68243561a54a09e38fd472b4fc2c17d5d
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>
libelf/ChangeLog
libelf/elf_getphdrnum.c