Skip to content

Commit

Permalink
Review: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
daladim committed Sep 16, 2021
1 parent dc80bdf commit 374ba94
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/read/pe/rich.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use alloc::vec::Vec;

use crate::{pe, ReadRef, LittleEndian as LE, U32};
use crate::{pe, LittleEndian as LE, ReadRef, U32};

/// Extracted infos about a possible Rich Header
#[derive(Debug, Clone, Copy)]
Expand Down Expand Up @@ -55,11 +55,14 @@ impl<'data> RichHeaderInfos<'data> {
start_sequence.extend_from_slice(crate::pod::bytes_of(xor_key));
start_sequence.extend_from_slice(crate::pod::bytes_of(xor_key));

let rich_header_start =
match read_bytes_until_sequence(all_headers, &start_sequence, nt_header_offset as usize) {
Err(()) => return None,
Ok(slice) => slice.len(),
};
let rich_header_start = match read_bytes_until_sequence(
all_headers,
&start_sequence,
nt_header_offset as usize,
) {
Err(()) => return None,
Ok(slice) => slice.len(),
};
let rh_len = dos_and_rich_header.len() - rich_header_start;

// Extract the contents of the rich header
Expand Down

0 comments on commit 374ba94

Please sign in to comment.