Add a warning about infinite reading in read_(until|line)
This commit is contained in:
@@ -1883,6 +1883,10 @@ pub trait BufRead: Read {
|
|||||||
///
|
///
|
||||||
/// If successful, this function will return the total number of bytes read.
|
/// If successful, this function will return the total number of bytes read.
|
||||||
///
|
///
|
||||||
|
/// This function is blocking and should be used carefully: it is possible for
|
||||||
|
/// an attacker to continuously send bytes without ever sending the delimiter
|
||||||
|
/// or EOF.
|
||||||
|
///
|
||||||
/// # Errors
|
/// # Errors
|
||||||
///
|
///
|
||||||
/// This function will ignore all instances of [`ErrorKind::Interrupted`] and
|
/// This function will ignore all instances of [`ErrorKind::Interrupted`] and
|
||||||
@@ -1945,6 +1949,10 @@ pub trait BufRead: Read {
|
|||||||
///
|
///
|
||||||
/// If this function returns `Ok(0)`, the stream has reached EOF.
|
/// If this function returns `Ok(0)`, the stream has reached EOF.
|
||||||
///
|
///
|
||||||
|
/// This function is blocking and should be used carefully: it is possible for
|
||||||
|
/// an attacker to continuously send bytes without ever sending a newline
|
||||||
|
/// or EOF.
|
||||||
|
///
|
||||||
/// # Errors
|
/// # Errors
|
||||||
///
|
///
|
||||||
/// This function has the same error semantics as [`read_until`] and will
|
/// This function has the same error semantics as [`read_until`] and will
|
||||||
|
|||||||
Reference in New Issue
Block a user