diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-09-04 16:31:48 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-09-04 16:31:48 +0000 |
commit | 7690af4da9c85c09ae4ee6705ae1aa972655594c (patch) | |
tree | f2ea27ae800063ade0fa9f87dfcc9a6e7e578215 /llvm/lib/Object | |
parent | 881452384a5a017b737a80903bb6295517d7ce20 (diff) | |
download | bcm5719-llvm-7690af4da9c85c09ae4ee6705ae1aa972655594c.tar.gz bcm5719-llvm-7690af4da9c85c09ae4ee6705ae1aa972655594c.zip |
[MachO] Fix LC_DYSYMTAB validation for external symbols
We were validating the same index (ilocalsym) twice, while iextdefsym
was never validated.
llvm-svn: 341378
Diffstat (limited to 'llvm/lib/Object')
-rw-r--r-- | llvm/lib/Object/MachOObjectFile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index e422903f280..76480b4ea44 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -1592,7 +1592,7 @@ MachOObjectFile::MachOObjectFile(MemoryBufferRef Object, bool IsLittleEndian, "command extends past the end of the symbol table"); return; } - if (Dysymtab.nextdefsym != 0 && Dysymtab.ilocalsym > Symtab.nsyms) { + if (Dysymtab.nextdefsym != 0 && Dysymtab.iextdefsym > Symtab.nsyms) { Err = malformedError("nextdefsym in LC_DYSYMTAB load command " "extends past the end of the symbol table"); return; |