[llvm] [llvm-objdump][ELF]Fix crash when reading strings from .dynstr (PR #125679)
Ruoyu Qiu via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 12 01:13:45 PST 2025
================
@@ -221,6 +224,20 @@ template <class ELFT> void ELFDumper<ELFT>::printDynamicSection() {
std::string TagFmt = " %-" + std::to_string(MaxLen) + "s ";
outs() << "\nDynamic Section:\n";
+ auto StringTableSize = (typename ELFT::Xword)0;
+ for (const auto &Sec : cantFail(Elf.sections())) {
----------------
cabbaken wrote:
I’ve fixed it in the latest commit. Let me know if you have any suggestions.
https://github.com/llvm/llvm-project/pull/125679
More information about the llvm-commits
mailing list