]> git.ipfire.org Git - thirdparty/elfutils.git/commit
src/readelf.c: Access symbol and version data only if available
authorAaron Merey <amerey@redhat.com>
Mon, 19 May 2025 19:02:07 +0000 (15:02 -0400)
committerAaron Merey <amerey@redhat.com>
Wed, 21 May 2025 14:11:42 +0000 (10:11 -0400)
commita1442fd3f4e6d2dbd770cc70d27925500569f993
tree984d22c5595fccd25b7c8d8edc7fba70c054d04f
parentc18a9ef154bf5583183443a2bf7de8f4cea89d8f
src/readelf.c: Access symbol and version data only if available

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>
src/readelf.c