mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 02:09:44 +02:00
GP-3840 Adjustment to FlowBlock::restrictedByConditional
This commit is contained in:
parent
c072972153
commit
0a23876e01
21 changed files with 147 additions and 34 deletions
|
@ -407,9 +407,15 @@ bool FlowBlock::restrictedByConditional(const FlowBlock *cond) const
|
|||
{
|
||||
if (sizeIn() == 1) return true; // Its impossible for any path to come through sibling to this
|
||||
if (getImmedDom() != cond) return false; // This is not dominated by conditional block at all
|
||||
bool seenCond = false;
|
||||
for(int4 i=0;i<sizeIn();++i) {
|
||||
const FlowBlock *inBlock = getIn(i);
|
||||
if (inBlock == cond) continue; // The unique edge from cond to this
|
||||
if (inBlock == cond) {
|
||||
if (seenCond)
|
||||
return false; // Coming in from cond block on multiple direct edges
|
||||
seenCond = true;
|
||||
continue;
|
||||
}
|
||||
while(inBlock != this) {
|
||||
if (inBlock == cond) return false; // Must have come through sibling
|
||||
inBlock = inBlock->getImmedDom();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue