]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libelf: Check e_shoff alignment before direct access of Elf(32|64)_Shdr.
authorMark Wielaard <mjw@redhat.com>
Thu, 4 Jun 2015 11:51:27 +0000 (13:51 +0200)
committerMark Wielaard <mjw@redhat.com>
Mon, 8 Jun 2015 09:12:38 +0000 (11:12 +0200)
commit560aa98b9aaa89ce345239de865eda0ba403af68
treed139b7f70b782c059a6a50d6e87854d001745a88
parentb9fd0eee50b028e4752595a8cc293bf2c331b1b9
libelf: Check e_shoff alignment before direct access of Elf(32|64)_Shdr.

In get_shnum the check was whether the Elf(32|64)_Ehdr was correctly
aligned, but to access the Shdr directly we need to check whether the
address that points to the Elf(32|64)_Shdr structure is correctly aligned.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
libelf/ChangeLog
libelf/elf_begin.c