Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cwe_checker
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-gitdep
cwe_checker
Commits
1e9e4ab9
Commit
1e9e4ab9
authored
4 years ago
by
Enkelmann
Committed by
Enkelmann
4 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement parsing of CALLOTHER jumps.
parent
1cbdc889
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
term.rs
cwe_checker_rs/src/pcode/term.rs
+9
-0
No files found.
cwe_checker_rs/src/pcode/term.rs
View file @
1e9e4ab9
...
...
@@ -18,6 +18,7 @@ pub struct Call {
pub
target
:
Label
,
#[serde(rename
=
"return"
)]
pub
return_
:
Option
<
Label
>
,
pub
call_string
:
Option
<
String
>
,
}
#[derive(Serialize,
Deserialize,
Debug,
PartialEq,
Eq,
Hash,
Clone)]
...
...
@@ -36,6 +37,7 @@ pub enum JmpType {
BRANCHIND
,
CALL
,
CALLIND
,
CALLOTHER
,
RETURN
,
}
...
...
@@ -94,6 +96,13 @@ impl From<Jmp> for IrJmp {
return_
:
call
.return_
.map
(
unwrap_label_direct
),
}
}
CALLOTHER
=>
{
let
call
=
jmp
.call
.unwrap
();
IrJmp
::
CallOther
{
description
:
call
.call_string
.unwrap
(),
return_
:
call
.return_
.map
(
unwrap_label_direct
),
}
}
RETURN
=>
IrJmp
::
Return
(
unwrap_label_indirect
(
jmp
.goto
.unwrap
())
.into
()),
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment