]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libelf: Only set shdr state when there is at least one shdr
authorMark Wielaard <mark@klomp.org>
Sun, 19 Dec 2021 14:52:32 +0000 (15:52 +0100)
committerMark Wielaard <mark@klomp.org>
Sun, 19 Dec 2021 14:52:32 +0000 (15:52 +0100)
commitaab1cc4c0313cd0a0ad9b7ecf794301126daab15
tree9d61955e4112b812cece40a882c7676d92e8d668
parent163d1e9582efa8248057b088ad9c28fc8d24512e
libelf: Only set shdr state when there is at least one shdr

The elf shdr state only needs to be set when scncnt is at least
one. Otherwise e_shoff can be bogus. Also use unsigned arithmetic for
checking e_shoff alignment.

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