Repository navigation
Commit 2f2a846
Rust: Preserve referenced contents through Cow::to_mut
The regenerated Cow::to_mut summary only propagates whole-value taint and misses the paths from the Cow variants through the receiver reference to the returned mutable reference. This loses the existing file-name taint flow through file_name.to_string_lossy().to_mut().
Model Cow::Owned as value flow from its stored value to the returned reference, and Cow::Borrowed as taint flow from the referenced contents because converting borrowed contents to owned contents may clone them.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 786f0f17-6512-4098-8c92-7721e13b78b21 parent 6e441b5 commit 2f2a846
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
0 commit comments