mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
GP-2747 Check for explicit case fallthru
This commit is contained in:
parent
17884b8786
commit
45374b3354
1 changed files with 5 additions and 0 deletions
|
@ -3425,6 +3425,11 @@ FlowBlock *BlockSwitch::nextFlowAfter(const FlowBlock *bl) const
|
||||||
{
|
{
|
||||||
if (getBlock(0) == bl)
|
if (getBlock(0) == bl)
|
||||||
return (FlowBlock *)0; // Don't know what will execute
|
return (FlowBlock *)0; // Don't know what will execute
|
||||||
|
|
||||||
|
// Can only evaluate this if bl is a case block that falls through to another case block.
|
||||||
|
// Otherwise there is a break statement in the flow
|
||||||
|
if (bl->getType() != t_goto) // Fallthru must be a goto block
|
||||||
|
return (FlowBlock *)0;
|
||||||
int4 i;
|
int4 i;
|
||||||
// Look for block to find flow after
|
// Look for block to find flow after
|
||||||
for(i=0;i<caseblocks.size();++i)
|
for(i=0;i<caseblocks.size();++i)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue