[llvm] [llvm-objdump][ELF]Fix crash when reading strings from .dynstr(#86612) (PR #125679)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 10 00:30:34 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;
----------------
jh7370 wrote:

Why not just `typename ELFT::Xword StringTableSize = 0`?

https://github.com/llvm/llvm-project/pull/125679


More information about the llvm-commits mailing list