[PATCH v2] src/readelf.c: Access symbol and version data only if available

Mark Wielaard mark@klomp.org
Tue May 20 20:38:07 GMT 2025


Hi Aaron,

On Mon, May 19, 2025 at 03:02:07PM -0400, Aaron Merey wrote:
> handle_dynamic_symtab can attempt to read symbol and version data from
> file offset of 0 or address of 0 if the associated DT_ tags aren't found.
> 
> Fix this by only reading symbol and version data when non-zero file
> offsets/addresses have been found.
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=32864
> 
> Suggested-by: Constantine Bytensky <cbytensky@gmail.com>
> Signed-off-by: Aaron Merey <amerey@redhat.com>
> 
> ---
> v2:
> 
> Verify that verneed_data and verdef_data sizes are sufficient.

This is actually v3, because I was nitpicking too much.
But this version is perfect I have nothing to nitpick anymore.

Thanks,

Mark



More information about the Elfutils-devel mailing list