[PATCH] D77216: [llvm-readobj] - Fix crashes and misbehaviors when reading strings from broken string tables.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 1 07:41:07 PDT 2020


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: rupprecht, emaste.
Herald added a reviewer: espindola.

There are cases when we either might print garbage or crash when
reading strings for dumping dynamic tags.

For example when a string table is not null-terminated or goes past the EOF.
This patch fixes issues mentioned.


https://reviews.llvm.org/D77216

Files:
  llvm/test/tools/llvm-readobj/ELF/dynamic-malformed.test
  llvm/test/tools/llvm-readobj/ELF/loadname.test
  llvm/tools/llvm-readobj/ELFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77216.254191.patch
Type: text/x-patch
Size: 8761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200401/9648e24d/attachment.bin>


More information about the llvm-commits mailing list