Skip to main content

read_stdin_with_limit

Function read_stdin_with_limit 

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

Reads from stdin with size limits to prevent memory exhaustion

§Security Checks

  • Input size limit enforced (max 10MB)
  • Prevents DoS via infinite stdin stream
  • Returns error if input exceeds size limit

§Returns

  • Ok(String) if input is within size limit
  • Err(io::Error) if input exceeds limit