mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
Merge remote-tracking branch 'origin/patch'
This commit is contained in:
@@ -478,7 +478,8 @@ public class DecompilerSwitchAnalyzer extends AbstractAnalyzer {
|
||||
// then it isn't a switch statment
|
||||
//
|
||||
// NOTE: Assumption, we have found all flows leading to the switch that might split the basic block
|
||||
|
||||
// NOTE: This assumption is a problem for internal pcode branching. Need to check for that.
|
||||
|
||||
final AtomicInteger foundCount = new AtomicInteger(0);
|
||||
SymbolicPropogator prop = new SymbolicPropogator(program,false);
|
||||
prop.flowConstants(jumpBlockAt.getFirstStartAddress(), jumpBlockAt,
|
||||
@@ -493,6 +494,27 @@ public class DecompilerSwitchAnalyzer extends AbstractAnalyzer {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean evaluateContextBefore(VarnodeContext context, Instruction instr) {
|
||||
// There shouldn't be any branching because a branch would split a block
|
||||
// but there could be internal branches, as the basic block algorithm can't
|
||||
// detect these cases correctly.
|
||||
PcodeOp[] pcode = instr.getPcode();
|
||||
for (PcodeOp pcodeOp : pcode) {
|
||||
if (pcodeOp.getOpcode() == PcodeOp.CBRANCH) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean followFalseConditionalBranches() {
|
||||
// There shouldn't be any because a branch would split a block
|
||||
// but there could be internal branches.
|
||||
return false;
|
||||
}
|
||||
}, false, monitor);
|
||||
|
||||
// only found one reference
|
||||
|
||||
@@ -3,8 +3,8 @@ MODULE FILE LICENSE: lib/commons-codec-1.18.0.jar Apache License 2.0
|
||||
MODULE FILE LICENSE: lib/guava-32.1.3-jre.jar Apache License 2.0
|
||||
MODULE FILE LICENSE: lib/failureaccess-1.0.1.jar Apache License 2.0
|
||||
MODULE FILE LICENSE: lib/jdom2-2.0.6.1.jar JDOM License
|
||||
MODULE FILE LICENSE: lib/log4j-api-2.25.4.jar Apache License 2.0
|
||||
MODULE FILE LICENSE: lib/log4j-core-2.25.4.jar Apache License 2.0
|
||||
MODULE FILE LICENSE: lib/log4j-api-2.26.1.jar Apache License 2.0
|
||||
MODULE FILE LICENSE: lib/log4j-core-2.26.1.jar Apache License 2.0
|
||||
MODULE FILE LICENSE: lib/commons-collections4-4.1.jar Apache License 2.0
|
||||
MODULE FILE LICENSE: lib/commons-lang3-3.20.0.jar Apache License 2.0
|
||||
MODULE FILE LICENSE: lib/commons-io-2.19.0.jar Apache License 2.0
|
||||
|
||||
@@ -34,8 +34,8 @@ dependencies {
|
||||
}
|
||||
api "com.google.guava:failureaccess:1.0.1"
|
||||
api "org.jdom:jdom2:2.0.6.1"
|
||||
api "org.apache.logging.log4j:log4j-api:2.25.4"
|
||||
api "org.apache.logging.log4j:log4j-core:2.25.4"
|
||||
api "org.apache.logging.log4j:log4j-api:2.26.1"
|
||||
api "org.apache.logging.log4j:log4j-core:2.26.1"
|
||||
api "org.apache.commons:commons-collections4:4.1"
|
||||
api "org.apache.commons:commons-compress:1.27.1" // requires commons-codec
|
||||
api "commons-codec:commons-codec:1.18.0"
|
||||
|
||||
Reference in New Issue
Block a user