mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
Don't loop endlessly for MachO files with 0 ncmds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225271 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -4204,6 +4204,8 @@ static void PrintLinkEditDataCommand(MachO::linkedit_data_command ld,
|
||||
static void PrintLoadCommands(const MachOObjectFile *Obj, uint32_t ncmds,
|
||||
uint32_t filetype, uint32_t cputype,
|
||||
bool verbose) {
|
||||
if (ncmds == 0)
|
||||
return;
|
||||
StringRef Buf = Obj->getData();
|
||||
MachOObjectFile::LoadCommandInfo Command = Obj->getFirstLoadCommandInfo();
|
||||
for (unsigned i = 0;; ++i) {
|
||||
|
Reference in New Issue
Block a user