commit | cc62e378c292daaded19f1fe03681d63b7437ea0 | [log] [tgz] |
---|---|---|
author | Mark Wielaard <mjw@redhat.com> | Wed Dec 31 00:51:45 2014 +0100 |
committer | Mark Wielaard <mjw@redhat.com> | Thu Jan 15 14:04:28 2015 +0100 |
tree | b61389196a961c575d901b7a41e5f936455ca526 | |
parent | d973206f716d441634f3b937be9c8c5b8b6250db [diff] |
libelf: gelf_getphdr should check phdr index is valid. elf_getphdrnum does checks the phdrnum makes sense. But gelf_getphdr checked the given index against the "raw" e_phnum or internal __elf_getphdrnum_rdlock result without checking. Extract the checking code into a new internal __elf_getphdrnum_chk_rdlock function and use that. Found by afl-fuzz. Signed-off-by: Mark Wielaard <mjw@redhat.com>