Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
Remove dependency memoffset.
Browse files Browse the repository at this point in the history
  • Loading branch information
koutheir committed Mar 27, 2024
1 parent fb5a7eb commit a4135b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ regex = { version = "1.10" }
scroll = { version = "0.12" }
flexi_logger = { version = "0.27" }
termcolor = { version = "1.4" }
memoffset = { version = "0.9" }
dynamic-loader-cache = { version = "0.1" }

clap = { version = "4.5", features = [
Expand Down
7 changes: 3 additions & 4 deletions src/pe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
// Licensed under the MIT license. This file may not be copied, modified,
// or distributed except according to those terms.

use core::mem;
use core::mem::{offset_of, size_of};

use goblin::pe::section_table::{IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ};
use log::debug;
use memoffset::offset_of;
use scroll::Pread;

use crate::errors::Result;
Expand Down Expand Up @@ -387,12 +386,12 @@ fn image_load_configuration_directory_has_safe_seh_handlers(
let (offset_of_se_handler_count, size_of_se_handler_count) = if pe.is_64 {
(
offset_of!(ImageLoadConfigDirectory64, SEHandlerCount),
mem::size_of::<ImageLoadConfigDirectory64_SEHandlerCount_Type>(),
size_of::<ImageLoadConfigDirectory64_SEHandlerCount_Type>(),
)
} else {
(
offset_of!(ImageLoadConfigDirectory32, SEHandlerCount),
mem::size_of::<ImageLoadConfigDirectory32_SEHandlerCount_Type>(),
size_of::<ImageLoadConfigDirectory32_SEHandlerCount_Type>(),
)
};

Expand Down

0 comments on commit a4135b4

Please sign in to comment.