diff options
author | Mark Wielaard <[email protected]> | 2025-02-27 21:22:49 +0100 |
---|---|---|
committer | Mark Wielaard <[email protected]> | 2025-02-27 21:23:01 +0100 |
commit | dfa7b2c23ddabcba2a4972fa67d3c670ae31f1ee (patch) | |
tree | 17312ada89457e552f2c63d763e210019dfff472 | |
parent | d40e0808309babcf2c88864aa3acef23f1fd3a70 (diff) |
readelf: Use section_name instead of elf_strptr in print_debug_frame_section
All other print_debug_* functions use section_name (ebl, shdr) to get
the current section name. Be consistent and use the same method in
print_debug_frame_section to make static analyzers happy who might
think elf_strptr can return NULL in this case.
* src/readelf.c (print_debug_frame_section): Use section_name
instead of elf_strptr to get the section name.
Signed-off-by: Mark Wielaard <[email protected]>
-rw-r--r-- | src/readelf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/readelf.c b/src/readelf.c index 61d5b71a..c9aebd5b 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -7170,7 +7170,7 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, size_t shstrndx; /* We know this call will succeed since it did in the caller. */ (void) elf_getshdrstrndx (ebl->elf, &shstrndx); - const char *scnname = elf_strptr (ebl->elf, shstrndx, shdr->sh_name); + const char *scnname = section_name (ebl, shdr); /* Needed if we find PC-relative addresses. */ GElf_Addr bias; |