Skip to content

Commit d0f5aad

Browse files
committed
Rust: Model to_string.
1 parent 1ff7a52 commit d0f5aad

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

rust/ql/lib/codeql/rust/frameworks/stdlib/lang-core.model.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ extensions:
3131
# String
3232
- ["lang:alloc", "<crate::string::String>::as_str", "Argument[self]", "ReturnValue", "taint", "manual"]
3333
- ["lang:alloc", "<crate::string::String>::as_bytes", "Argument[self]", "ReturnValue", "taint", "manual"]
34+
- ["lang:alloc", "<_ as crate::string::ToString>::to_string", "Argument[self]", "ReturnValue", "taint", "manual"]

rust/ql/test/library-tests/dataflow/local/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ fn parse() {
440440
let d : i64 = b.parse().unwrap();
441441

442442
sink(a); // $ hasValueFlow=90
443-
sink_string(b); // $ MISSING: hasTaintFlow=90
443+
sink_string(b); // $ hasTaintFlow=90
444444
sink(c); // $ MISSING: hasTaintFlow=90
445445
sink(d); // $ MISSING: hasTaintFlow=90
446446
}

0 commit comments

Comments
 (0)