GP-3707 corrected array index bug in RISCV_ElfRelocationContext

This commit is contained in:
ghidra1 2023-08-21 18:19:02 -04:00
parent 29be477eef
commit 0233f35d1f

View file

@ -71,7 +71,7 @@ class RISCV_ElfRelocationContext extends ElfRelocationContext {
--relIndex;
}
// look for hi20 relocation
while (relIndex < relocations.length && relocations[relIndex - 1].getOffset() == symValue) {
while (relIndex < relocations.length && relocations[relIndex].getOffset() == symValue) {
int type = relocations[relIndex].getType();
if ((type == RISCV_ElfRelocationConstants.R_RISCV_PCREL_HI20) ||
(type == RISCV_ElfRelocationConstants.R_RISCV_GOT_HI20)) {