Skip to content

Commit

Permalink
refactor CWE-416 check (#429)
Browse files Browse the repository at this point in the history
  • Loading branch information
Enkelmann authored Sep 4, 2023
1 parent 2e11e84 commit 270b4d4
Show file tree
Hide file tree
Showing 5 changed files with 248 additions and 345 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
0.8-dev
===

- Improve logic and context information generation of CWE-416 (use-after-free) check (PRs #423, #429)

0.7 (2023-06)
====

Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[workspace]
members = ["src/cwe_checker_lib", "src/caller", "test", "src/installer"]
resolver = "2"
4 changes: 2 additions & 2 deletions src/cwe_checker_lib/src/checkers/cwe_416/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl<'a> Context<'a> {
state: &mut State,
call_tid: &Tid,
call_params: impl IntoIterator<Item = &'b Arg>,
) -> Option<Vec<(AbstractIdentifier, Tid)>> {
) -> Option<Vec<(AbstractIdentifier, Vec<Tid>)>> {
let mut warnings = Vec::new();
for arg in call_params {
if let Some(arg_value) = self
Expand Down Expand Up @@ -174,7 +174,7 @@ impl<'a> Context<'a> {
name: &str,
description: String,
location: &Tid,
warning_causes: Vec<(AbstractIdentifier, Tid)>,
warning_causes: Vec<(AbstractIdentifier, Vec<Tid>)>,
root_function: &Tid,
) {
let cwe_warning = CweWarning {
Expand Down
Loading

0 comments on commit 270b4d4

Please sign in to comment.