]> git.ipfire.org Git - thirdparty/elfutils.git/commit
unstrip: exit early if there are no sections in the stripped file
authorMark Wielaard <mark@klomp.org>
Sun, 1 Jun 2025 23:35:16 +0000 (01:35 +0200)
committerMark Wielaard <mark@klomp.org>
Sun, 1 Jun 2025 23:35:16 +0000 (01:35 +0200)
commit6bb3ff44a4029562f45ddac354c670aa51ae7b87
tree5cc52eea040d6fe5c4a788cf6753e165951d1f77
parent11db83c3c0ab0d0325165f448ea4b6b254d7e2ea
unstrip: exit early if there are no sections in the stripped file

If there is only section zero that shouldn't count. Then we would
still try to work on an empty set of sections and give an obscure
error later.

    * src/unstrip.c (copy_elided_sections): Check stripped_shnum <= 1.

Signed-off-by: Mark Wielaard <mark@klomp.org>
src/unstrip.c