]> git.ipfire.org Git - thirdparty/elfutils.git/commit
dwfl_offline_section_address: replace asserts with early return
authorAaron Merey <amerey@redhat.com>
Wed, 1 Nov 2023 20:15:16 +0000 (16:15 -0400)
committerAaron Merey <amerey@redhat.com>
Wed, 1 Nov 2023 23:29:16 +0000 (19:29 -0400)
commita34c5faad861efdd26d1c52b4f8d9d4077e03131
tree525d3fa1e18c6134f3e37f52d90520de838dc502
parentc112cf0f1975e19a6111f594c0e5c4d2210c0f9a
dwfl_offline_section_address: replace asserts with early return

dwfl_offline_section_address asserts that the current module is ET_REL.

A possibly corrupt .gnu_debuglink can cause an abort by calling
dwfl_offline_section_address on an ET_DYN module.

Prevent this abort and similar ones by replacing
dwfl_offline_section_address initial asserts with an early return.

https://sourceware.org/bugzilla/show_bug.cgi?id=30980

Signed-off-by: Aaron Merey <amerey@redhat.com>
libdwfl/offline.c