summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objdump/MachODump.cpp
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2017-02-03 18:22:04 +0000
committerKevin Enderby <enderby@apple.com>2017-02-03 18:22:04 +0000
commit6de201ec32ca5c348bb81b96e2b9e9ccadb1fe03 (patch)
tree61ae2cc311936bf7a487eac0faab96e0edf3eb6c /llvm/tools/llvm-objdump/MachODump.cpp
parent034c1bd32c2d201ba333b5cda9c8f873276beee9 (diff)
downloadbcm5719-llvm-6de201ec32ca5c348bb81b96e2b9e9ccadb1fe03.tar.gz
bcm5719-llvm-6de201ec32ca5c348bb81b96e2b9e9ccadb1fe03.zip
Fix a bug in llvm-obdump(1) with the -objc-meta-data flag with -macho
which caused a hang on a malformed binary with bad bind info. rdar://29672108 llvm-svn: 294021
Diffstat (limited to 'llvm/tools/llvm-objdump/MachODump.cpp')
-rw-r--r--llvm/tools/llvm-objdump/MachODump.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-objdump/MachODump.cpp b/llvm/tools/llvm-objdump/MachODump.cpp
index b2e23f5032f..e4ddf5457fb 100644
--- a/llvm/tools/llvm-objdump/MachODump.cpp
+++ b/llvm/tools/llvm-objdump/MachODump.cpp
@@ -9579,7 +9579,7 @@ static const char *get_dyld_bind_info_symbolname(uint64_t ReferenceValue,
uint32_t SegIndex = Entry.segmentIndex();
uint64_t OffsetInSeg = Entry.segmentOffset();
if (!sectionTable.isValidSegIndexAndOffset(SegIndex, OffsetInSeg))
- continue;
+ return nullptr;
uint64_t Address = sectionTable.address(SegIndex, OffsetInSeg);
StringRef name = Entry.symbolName();
if (!name.empty())
OpenPOWER on IntegriCloud