Repository navigation
Commit 6e441b5
Rust: Distinguish taint and value flow in String::from
The regenerated String::from summary treats the whole argument as value-preserving. That is too strong for borrowed string conversions: the resulting owned String carries the input contents, but is not the same dataflow value as the borrowed input.
Override this with whole-argument taint flow and explicit Cow variants. Moving the String out of Cow::Owned preserves its value, whereas Cow::Borrowed requires taint flow from the referenced contents. Keep both Cow paths because manual summaries replace the generated alternatives.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 786f0f17-6512-4098-8c92-7721e13b78b21 parent f831da9 commit 6e441b5
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| |||
0 commit comments