Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a warning about infinite reading in read_(until|line) #72888

Merged

Conversation

poliorcetics
Copy link
Contributor

Fix for #48788.

This PR adds a warning to BufRead::read_line and BufRead::read_until about the possibility of an attack using the behaviour of these functions.

I did not mention a possible fix (using Read::take, should I ?

@rust-highfive
Copy link
Collaborator

r? @LukasKalbertodt

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 1, 2020
@Dylan-DPC-zz
Copy link

looks fine to me

@bors r=Dylan-DPC

@bors
Copy link
Contributor

bors commented Jun 2, 2020

📌 Commit d8cc2c1 has been approved by Dylan-DPC

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 2, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 2, 2020
Rollup of 4 pull requests

Successful merges:

 - rust-lang#72884 (RawString error reporting cleanup )
 - rust-lang#72888 (Add a warning about infinite reading in read_(until|line))
 - rust-lang#72914 (Minor: off-by-one error in RELEASES.md)
 - rust-lang#72916 (Update README.md)

Failed merges:

r? @ghost
@bors bors merged commit 9763e0c into rust-lang:master Jun 2, 2020
@poliorcetics poliorcetics deleted the improve-read_line-read_until-doc branch June 2, 2020 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants