Skip to main content

read_file

Function read_file 

Source
pub(crate) fn read_file(path: &str) -> Result<Vec<u8>, &'static str>
Expand description

Reads file.

Returns an error when the file is larger than MAX_READ_BYTES instead of silently truncating it: a truncated ELF blob must never reach SYS_MODULE_LOAD.