mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GP-4035 updated to not use address.subtract to determine inst offset,
which could in some cases cause an overflow error.
This commit is contained in:
parent
07f0f57cab
commit
07c9fb3f45
1 changed files with 7 additions and 3 deletions
|
@ -1226,8 +1226,12 @@ public class AutoVersionTrackingTask extends Task {
|
||||||
}
|
}
|
||||||
|
|
||||||
// get offset from top of function to use in function to operandMap map
|
// get offset from top of function to use in function to operandMap map
|
||||||
Long offset =
|
// can be positive or negative offset (positive means instruction address is after
|
||||||
inst.getAddress().subtract(function.getEntryPoint().getOffset()).getOffset();
|
// the entry address, negative means instruction address is before entry address)
|
||||||
|
Long entryOffset = function.getEntryPoint().getOffset();
|
||||||
|
Long instOffset = inst.getAddress().getOffset();
|
||||||
|
Long offset = instOffset - entryOffset;
|
||||||
|
|
||||||
offsetToOperandsMap.put(offset, map);
|
offsetToOperandsMap.put(offset, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue