Unverified Commit 6e16f015 by Enkelmann Committed by GitHub

CWE metadata fix (#388)

parent 88354622
...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment