Fix a pair of array index checks.

Patch by Marius Wachtler.

llvm-svn: 196560
This commit is contained in:
Eric Christopher 2013-12-06 02:33:38 +00:00
parent 0d62c78c20
commit 13250cbb4a
1 changed files with 5 additions and 2 deletions

View File

@ -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,6 +962,9 @@ MachOObjectFile::getRelocationTypeName(DataRefImpl Rel,
"PPC_RELOC_LO14_SECTDIFF",
"PPC_RELOC_LOCAL_SECTDIFF" };
if (RType > 15)
res = "Unknown";
else
res = Table[RType];
break;
}