diff --git a/crates/loader/src/pe.rs b/crates/loader/src/pe.rs index 22b0b68..dce5c66 100644 --- a/crates/loader/src/pe.rs +++ b/crates/loader/src/pe.rs @@ -170,7 +170,10 @@ impl ParsedPe { } let mut sections = Vec::with_capacity(usize::from(number_of_sections)); - for sec_bytes in bytes[section_table_offset..table_end].chunks_exact(SECTION_HEADER_SIZE) { + for sec_bytes in bytes[section_table_offset..table_end] + .as_chunks::() + .0 + { // Section name (up to 8 bytes UTF-8 or null-padded ASCII) let name_raw = &sec_bytes[0..8]; let name_len = name_raw.iter().position(|&b| b == 0).unwrap_or(8);