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
diff --git a/llvm/tools/llvm-objdump/MachODump.cpp b/llvm/tools/llvm-objdump/MachODump.cpp
index b2e23f5..e4ddf54 100644
--- a/llvm/tools/llvm-objdump/MachODump.cpp
+++ b/llvm/tools/llvm-objdump/MachODump.cpp
@@ -9579,7 +9579,7 @@
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())