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
6e16f015
Unverified
Commit
6e16f015
authored
Feb 08, 2023
by
Enkelmann
Committed by
GitHub
Feb 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CWE metadata fix (#388)
parent
88354622
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
state.rs
src/cwe_checker_lib/src/checkers/cwe_119/state.rs
+12
-8
No files found.
src/cwe_checker_lib/src/checkers/cwe_119/state.rs
View file @
6e16f015
...
@@ -91,10 +91,12 @@ impl State {
...
@@ -91,10 +91,12 @@ impl State {
out_of_bounds_access_warnings
out_of_bounds_access_warnings
.push
(
format!
(
"Relevant callgraph TIDs: [{call_sequence_tids}]"
));
.push
(
format!
(
"Relevant callgraph TIDs: [{call_sequence_tids}]"
));
}
else
{
}
else
{
out_of_bounds_access_warnings
.push
(
format!
(
let
mut
callgraph_tids
=
format!
(
"{}"
,
self
.stack_id
.get_tid
());
"Relevant callgraph TIDs: [{}]"
,
for
call_tid
in
id
.get_path_hints
()
{
self
.stack_id
.get_tid
()
callgraph_tids
+=
&
format!
(
", {call_tid}"
);
));
}
out_of_bounds_access_warnings
.push
(
format!
(
"Relevant callgraph TIDs: [{callgraph_tids}]"
,));
}
}
// Replace the bound with `Top` to prevent duplicate CWE warnings with the same root cause.
// Replace the bound with `Top` to prevent duplicate CWE warnings with the same root cause.
self
.object_lower_bounds
self
.object_lower_bounds
...
@@ -126,10 +128,12 @@ impl State {
...
@@ -126,10 +128,12 @@ impl State {
out_of_bounds_access_warnings
out_of_bounds_access_warnings
.push
(
format!
(
"Relevant callgraph TIDs: [{call_sequence_tids}]"
));
.push
(
format!
(
"Relevant callgraph TIDs: [{call_sequence_tids}]"
));
}
else
{
}
else
{
out_of_bounds_access_warnings
.push
(
format!
(
let
mut
callgraph_tids
=
format!
(
"{}"
,
self
.stack_id
.get_tid
());
"Relevant callgraph TIDs: [{}]"
,
for
call_tid
in
id
.get_path_hints
()
{
self
.stack_id
.get_tid
()
callgraph_tids
+=
&
format!
(
", {call_tid}"
);
));
}
out_of_bounds_access_warnings
.push
(
format!
(
"Relevant callgraph TIDs: [{callgraph_tids}]"
,));
}
}
// Replace the bound with `Top` to prevent duplicate CWE warnings with the same root cause.
// Replace the bound with `Top` to prevent duplicate CWE warnings with the same root cause.
self
.object_upper_bounds
self
.object_upper_bounds
...
...
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