GP-3599 Fix for function bodies including one byte of non-disassembled

data.  PowerPC disassembly from computed branch.
This commit is contained in:
emteere
2023-06-30 22:42:47 +00:00
parent a7063c672e
commit b7ede746d0
6 changed files with 312 additions and 4 deletions

View File

@@ -226,7 +226,9 @@ public class PowerPCAddressAnalyzer extends ConstantPropagationAnalyzer {
public boolean evaluateReference(VarnodeContext context, Instruction instr,
int pcodeop, Address address, int size, DataType dataType, RefType refType) {
if (instr.getFlowType().isJump()) {
if (refType.isJump() && refType.isComputed() &&
program.getMemory().contains(address) && address.getOffset() != 0) {
super.evaluateReference(context, instr, pcodeop, address, size, dataType, refType);
// for branching instructions, if we have a good target, mark it
// if this isn't straight code (thunk computation), let someone else lay down the reference
return !symEval.encounteredBranch();