Skip to content

Commit 6b08297

Browse files
committed
Rust: Repair after merge.
1 parent bc4d8a8 commit 6b08297

File tree

6 files changed

+207
-187
lines changed

6 files changed

+207
-187
lines changed
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
multipleCallTargets
2-
| test.rs:266:22:266:43 | file.read(...) |
3-
| test.rs:275:22:275:41 | f1.read(...) |

rust/ql/test/library-tests/dataflow/sources/file/InlineFlow.expected

Lines changed: 55 additions & 63 deletions
Large diffs are not rendered by default.

rust/ql/test/library-tests/dataflow/sources/file/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,15 @@ async fn test_tokio_file() -> std::io::Result<()> {
242242
let file2 = tokio::fs::File::open("another_file.txt").await?; // $ Alert[rust/summary/taint-sources]
243243
let mut reader = file1.chain(file2);
244244
reader.read_to_string(&mut buffer).await?;
245-
sink(&buffer); // $ MISSING: hasTaintFlow="file.txt" hasTaintFlow="another_file.txt" -- we cannot resolve the `chain` and `read_to_string` calls above, which comes from `impl<R: AsyncRead + ?Sized> AsyncReadExt for R {}` in `async_read_ext.rs`
245+
sink(&buffer); // $ MISSING: hasTaintFlow="file.txt" hasTaintFlow="another_file.txt"
246246
}
247247

248248
{
249249
let mut buffer = String::new();
250250
let file1 = tokio::fs::File::open("file.txt").await?; // $ Alert[rust/summary/taint-sources]
251251
let mut reader = file1.take(100);
252252
reader.read_to_string(&mut buffer).await?;
253-
sink(&buffer); // $ MISSING: hasTaintFlow="file.txt" -- we cannot resolve the `take` and `read_to_string` calls above, which comes from `impl<R: AsyncRead + ?Sized> AsyncReadExt for R {}` in `async_read_ext.rs`
253+
sink(&buffer); // $ MISSING: hasTaintFlow="file.txt"
254254
}
255255

256256
Ok(())
Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
multipleCallTargets
22
| test.rs:59:62:59:77 | ...::from(...) |
33
| test.rs:66:58:66:73 | ...::from(...) |
4-
| test.rs:399:31:399:88 | ...::read(...) |
5-
| test.rs:403:31:403:55 | reader.read(...) |
6-
| test.rs:437:26:437:43 | reader2.fill_buf() |
7-
| test.rs:457:31:457:89 | ...::read(...) |
8-
| test.rs:461:31:461:56 | reader2.read(...) |
9-
| test.rs:479:26:479:43 | reader2.fill_buf() |
10-
| test.rs:486:31:486:66 | reader2.read_until(...) |
11-
| test.rs:493:31:493:58 | reader2.read_line(...) |
12-
| test.rs:500:31:500:62 | reader2.read_to_end(...) |
13-
| test.rs:506:36:506:50 | reader2.lines() |
14-
| test.rs:507:18:507:36 | lines_stream.next() |
15-
| test.rs:508:36:508:54 | lines_stream.next() |
4+
| test.rs:389:30:389:67 | pinned.poll_read(...) |
5+
| test.rs:416:26:416:54 | pinned.poll_fill_buf(...) |
6+
| test.rs:423:27:423:71 | ... .poll_fill_buf(...) |
7+
| test.rs:447:30:447:67 | pinned.poll_read(...) |
8+
| test.rs:470:26:470:54 | pinned.poll_fill_buf(...) |
169
| test.rs:519:50:519:66 | ...::from(...) |
1710
| test.rs:519:50:519:66 | ...::from(...) |

0 commit comments

Comments
 (0)