projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8edf9f
)
Fix a pair of array index checks.
author
Eric Christopher
<echristo@gmail.com>
Fri, 6 Dec 2013 02:33:38 +0000
(
02:33
+0000)
committer
Eric Christopher
<echristo@gmail.com>
Fri, 6 Dec 2013 02:33:38 +0000
(
02:33
+0000)
Patch by Marius Wachtler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196560
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Object/MachOObjectFile.cpp
patch
|
blob
|
history
diff --git
a/lib/Object/MachOObjectFile.cpp
b/lib/Object/MachOObjectFile.cpp
index d2cb8bde6d24d7611cb25c8e6ff8ccd9bc577b2b..dc0f9ff6b46326ffcb52165e20c0b725e701ad05 100644
(file)
--- a/
lib/Object/MachOObjectFile.cpp
+++ b/
lib/Object/MachOObjectFile.cpp
@@
-899,7
+899,7
@@
MachOObjectFile::getRelocationTypeName(DataRefImpl Rel,
"GENERIC_RELOC_LOCAL_SECTDIFF",
"GENERIC_RELOC_TLV" };
- if (RType >
6
)
+ if (RType >
5
)
res = "Unknown";
else
res = Table[RType];
@@
-962,7
+962,10
@@
MachOObjectFile::getRelocationTypeName(DataRefImpl Rel,
"PPC_RELOC_LO14_SECTDIFF",
"PPC_RELOC_LOCAL_SECTDIFF" };
- res = Table[RType];
+ if (RType > 15)
+ res = "Unknown";
+ else
+ res = Table[RType];
break;
}
case Triple::UnknownArch: