summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2018-09-04 16:31:48 +0000
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2018-09-04 16:31:48 +0000
commit7690af4da9c85c09ae4ee6705ae1aa972655594c (patch)
treef2ea27ae800063ade0fa9f87dfcc9a6e7e578215 /llvm/lib/Object
parent881452384a5a017b737a80903bb6295517d7ce20 (diff)
downloadbcm5719-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.cpp2
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;
OpenPOWER on IntegriCloud