Function simple_parse::validate_reader [−][src]
pub fn validate_reader<R: Read + ?Sized>(
static_size: usize,
dst: &mut Vec<u8>,
src: &mut R
) -> Result<(), SpError>
Reads static_size
bytes from src
into dst
This function can be used with untrusted static_size
as it will
consume at most [MAX_ALLOC_SIZE] chunks at a time to prevent OOM.