mirror of
https://github.com/github/codeql.git
synced 2026-03-30 20:28:15 +02:00
Rust: Convert split_off QL-defined barrier to a neutral model (which was always the intent).
This commit is contained in:
@@ -64,3 +64,5 @@ extensions:
|
||||
- ["<alloc::collections::vec_deque::VecDeque as core::convert::From>::from", "sink", "manual"]
|
||||
- ["<alloc::sync::Arc as core::convert::From>::from", "sink", "manual"]
|
||||
- ["<alloc::rc::Rc as core::convert::From>::from", "sink", "manual"]
|
||||
- ["<alloc::string::String>::split_off", "sink", "manual"]
|
||||
- ["<alloc::vec::Vec>::split_off", "sink", "manual"]
|
||||
|
||||
@@ -63,17 +63,4 @@ module UncontrolledAllocationSize {
|
||||
branch = false
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* A barrier for uncontrolled allocation size flow into particular functions.
|
||||
*/
|
||||
private class ModeledBarrier extends Barrier {
|
||||
ModeledBarrier() {
|
||||
exists(MethodCall c |
|
||||
c.getStaticTarget().getCanonicalPath() =
|
||||
["<alloc::string::String>::split_off", "<alloc::vec::Vec>::split_off"] and
|
||||
this.asExpr() = c.getAnArgument()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user