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
dca99770
Unverified
Commit
dca99770
authored
Dec 07, 2021
by
Enkelmann
Committed by
GitHub
Dec 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix size computation of implicit subpiece instructions (#263)
parent
f45bd69e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
expression.rs
...checker_lib/src/intermediate_representation/expression.rs
+5
-2
No files found.
src/cwe_checker_lib/src/intermediate_representation/expression.rs
View file @
dca99770
...
...
@@ -303,10 +303,13 @@ impl Expression {
}
Expression
::
Var
(
variable
)
=>
{
if
let
Some
(
register
)
=
register_map
.get
(
&
variable
.name
)
{
if
variable
.name
!=
*
register
.base_register
{
// We replace the register with a subpiece if the register itself is not a base register
// or if the expression is an implicit subpiece (identifiable with `variable.size < register.size`).
if
variable
.name
!=
*
register
.base_register
||
variable
.size
<
register
.size
{
let
target_size
=
variable
.size
;
self
.create_subpiece_from_sub_register
(
register
.base_register
.clone
(),
register
.
size
,
target_
size
,
register
.lsb
,
register_map
,
);
...
...
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