mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 17:24:48 +00:00
Fix a pair of array index checks.
Patch by Marius Wachtler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196560 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -899,7 +899,7 @@ MachOObjectFile::getRelocationTypeName(DataRefImpl Rel,
|
|||||||
"GENERIC_RELOC_LOCAL_SECTDIFF",
|
"GENERIC_RELOC_LOCAL_SECTDIFF",
|
||||||
"GENERIC_RELOC_TLV" };
|
"GENERIC_RELOC_TLV" };
|
||||||
|
|
||||||
if (RType > 6)
|
if (RType > 5)
|
||||||
res = "Unknown";
|
res = "Unknown";
|
||||||
else
|
else
|
||||||
res = Table[RType];
|
res = Table[RType];
|
||||||
@ -962,6 +962,9 @@ MachOObjectFile::getRelocationTypeName(DataRefImpl Rel,
|
|||||||
"PPC_RELOC_LO14_SECTDIFF",
|
"PPC_RELOC_LO14_SECTDIFF",
|
||||||
"PPC_RELOC_LOCAL_SECTDIFF" };
|
"PPC_RELOC_LOCAL_SECTDIFF" };
|
||||||
|
|
||||||
|
if (RType > 15)
|
||||||
|
res = "Unknown";
|
||||||
|
else
|
||||||
res = Table[RType];
|
res = Table[RType];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user