Skip to content

Commit f2dc585

Browse files
committed
Rust: Convert split_off QL-defined barrier to a neutral model (which was always the intent).
1 parent 478f56b commit f2dc585

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

rust/ql/lib/codeql/rust/frameworks/stdlib/alloc.model.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,5 @@ extensions:
6464
- ["<alloc::collections::vec_deque::VecDeque as core::convert::From>::from", "sink", "manual"]
6565
- ["<alloc::sync::Arc as core::convert::From>::from", "sink", "manual"]
6666
- ["<alloc::rc::Rc as core::convert::From>::from", "sink", "manual"]
67+
- ["<alloc::string::String>::split_off", "sink", "manual"]
68+
- ["<alloc::vec::Vec>::split_off", "sink", "manual"]

rust/ql/lib/codeql/rust/security/UncontrolledAllocationSizeExtensions.qll

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,4 @@ module UncontrolledAllocationSize {
6363
branch = false
6464
)
6565
}
66-
67-
/**
68-
* A barrier for uncontrolled allocation size flow into particular functions.
69-
*/
70-
private class ModeledBarrier extends Barrier {
71-
ModeledBarrier() {
72-
exists(MethodCall c |
73-
c.getStaticTarget().getCanonicalPath() =
74-
["<alloc::string::String>::split_off", "<alloc::vec::Vec>::split_off"] and
75-
this.asExpr() = c.getAnArgument()
76-
)
77-
}
78-
}
7966
}

0 commit comments

Comments
 (0)