rust-bitcoin-unsafe-fast/io/src
Tobin C. Harding f29da57ef6
io: Add functions to read to the end of a reader
The `std::io::Read` trait includes `read_to_end` but that method
provides a denial of service attack vector since an unbounded reader
will exhaust all system memory.

Add a method to our `Read` trait called `read_to_limit` that does the
same as `std::io::Read::read_to_end` but with memory exhaustion
protection.

Add a `read_to_end` method on our `Take` trait and call through to it
from the new method on our `Read` trait called `read_to_limit`.
2024-01-17 11:23:06 +11:00
..
error.rs 2023-12-10 automated rustfmt nightly 2023-12-10 00:58:56 +00:00
lib.rs io: Add functions to read to the end of a reader 2024-01-17 11:23:06 +11:00
macros.rs Inline io module in io crate root 2023-11-28 14:17:14 +11:00