Skip to main content

elf_parse_no_unwind

Function elf_parse_no_unwind 

Source
pub open spec fn elf_parse_no_unwind(input: &[u8]) -> bool
Expand description
{
    if input@.len() < 16 || input@[..4] != seq![0x7fu8, b'E', b'L', b'F'] {
        true
    } else {
        let addr_pt2 = as_ptr_spec(input).addr() + 16;
        match input@[4] {
            1 => input@.len() < 52 || addr_pt2 % 4 == 0,
            2 => input@.len() < 64 || addr_pt2 % 8 == 0,
            _ => true,
        }
    }
}

https://docs.rs/xmas-elf/0.10.0/src/xmas_elf/header.rs.html#9-52