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-depend
cwe_checker
Commits
fde0aa55
Commit
fde0aa55
authored
Oct 06, 2020
by
Enkelmann
Committed by
Enkelmann
Nov 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cargo fmt
parent
3c1edf8d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
mod.rs
cwe_checker_rs/src/bil/mod.rs
+6
-2
term.rs
cwe_checker_rs/src/pcode/term.rs
+5
-3
No files found.
cwe_checker_rs/src/bil/mod.rs
View file @
fde0aa55
...
...
@@ -246,8 +246,12 @@ impl From<Expression> for IrExpression {
Const
(
bitvector
)
=>
{
// The internal IR expects everything to be byte-sized, so we have to extend the bitvector if necessary.
let
size
:
ByteSize
=
bitvector
.width
()
.into
();
IrExpression
::
Const
(
bitvector
.into_zero_extend
(
apint
::
BitWidth
::
from
(
size
))
.unwrap
())
},
IrExpression
::
Const
(
bitvector
.into_zero_extend
(
apint
::
BitWidth
::
from
(
size
))
.unwrap
(),
)
}
Load
{
..
}
|
Store
{
..
}
|
Let
{
..
}
=>
panic!
(),
IfThenElse
{
true_exp
,
..
}
=>
IrExpression
::
Unknown
{
description
:
"BAP-IfThenElse-expression"
.into
(),
...
...
cwe_checker_rs/src/pcode/term.rs
View file @
fde0aa55
...
...
@@ -16,7 +16,7 @@ use crate::prelude::*;
#[derive(Serialize,
Deserialize,
Debug,
PartialEq,
Eq,
Hash,
Clone)]
pub
struct
Call
{
pub
target
:
Label
,
#[serde(rename
=
"return"
)]
#[serde(rename
=
"return"
)]
pub
return_
:
Option
<
Label
>
,
}
...
...
@@ -70,13 +70,15 @@ impl From<Jmp> for IrJmp {
// i.e. jumping there means jumping to nowhere.
// Usually the jump ends up jumping to address 0.
IrJmp
::
CallOther
{
description
:
format!
(
"Unresolved jump: Jump to value read from address {}"
,
address
),
description
:
format!
(
"Unresolved jump: Jump to value read from address {}"
,
address
),
return_
:
None
,
}
}
else
{
IrJmp
::
BranchInd
(
target
.into
())
}
}
CALL
=>
{
let
call
=
jmp
.call
.unwrap
();
...
...
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