]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdwfl: Fix out of memory handling in link_map.c report_r_debug
authorMark Wielaard <mark@klomp.org>
Mon, 4 May 2026 15:26:14 +0000 (17:26 +0200)
committerMark Wielaard <mark@klomp.org>
Mon, 4 May 2026 18:44:14 +0000 (20:44 +0200)
commitcf2c8589b4eccef7f2ae11783dd6996420cb6e67
tree7557a377eca19be9b5e557700fefd7a5be0e061f
parentc1b0ff9d92b08397b0e653a8ccefe1d1248cba57
libdwfl: Fix out of memory handling in link_map.c report_r_debug

In report_r_debug we don't fully handle an out of memory condition
when trying to allocate memory for the r_debug_info_module struct.
Deallocated allocated buffers and return -1 immediately instead of
trying to continue.

* libdwfl/link_map.c (report_r_debug): Call release_buffer
with -1 and return on malloc failure.

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