Commit 9763e0c
authored
Rollup merge of rust-lang#72888 - poliorcetics:improve-read_line-read_until-doc, r=Dylan-DPC
Add a warning about infinite reading in read_(until|line)
Fix for rust-lang#48788.
This PR adds a warning to [`BufRead::read_line`](https://doc.rust-lang.org/stable/std/io/trait.BufRead.html#method.read_line) and [`BufRead::read_until`](https://doc.rust-lang.org/stable/std/io/trait.BufRead.html#method.read_until) about the possibility of an attack using the behaviour of these functions.
I did not mention a possible fix (using [`Read::take`](https://doc.rust-lang.org/stable/std/io/trait.Read.html#method.take), should I ?1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1883 | 1883 | | |
1884 | 1884 | | |
1885 | 1885 | | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
1886 | 1890 | | |
1887 | 1891 | | |
1888 | 1892 | | |
| |||
1945 | 1949 | | |
1946 | 1950 | | |
1947 | 1951 | | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
1948 | 1956 | | |
1949 | 1957 | | |
1950 | 1958 | | |
| |||
0 commit comments