mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GP-4226 Detect BRANCHIND used as a RETURN
This commit is contained in:
parent
dffb5fd859
commit
e655ab3cb3
8 changed files with 115 additions and 37 deletions
|
@ -525,6 +525,16 @@ public:
|
|||
/// It knows how to map from specific switch variable values to the destination
|
||||
/// \e case block and how to label the value.
|
||||
class JumpTable {
|
||||
public:
|
||||
/// \brief Recovery status for a specific JumpTable
|
||||
enum RecoveryMode {
|
||||
success = 0, ///< JumpTable is fully recovered
|
||||
fail_normal = 1, ///< Normal failure to recover
|
||||
fail_thunk = 2, ///< Likely \b thunk
|
||||
fail_noflow = 3, ///< No legal flow to BRANCHIND
|
||||
fail_return = 4 ///< Likely \b return operation
|
||||
};
|
||||
private:
|
||||
/// \brief An address table index and its corresponding out-edge
|
||||
struct IndexPair {
|
||||
int4 blockPosition; ///< Out-edge index for the basic-block
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue