Skip to main content

safe_read_stdin

Function safe_read_stdin 

Source
pub fn safe_read_stdin() -> Result<String, String>
Expand description

Read from stdin with a size cap. Reads up to MAX_FILE_SIZE bytes then errors. Prevents OOM on cat huge.log | reliary-agent ....