Skip to content

Commit cae0561

Browse files
committed
fix(goblin): disable PE import table parser
1 parent 96a145b commit cae0561

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,6 @@ lto = true
7575

7676
[profile.bench]
7777
debug = true
78+
79+
[patch.crates-io]
80+
goblin = { git = "https://github.com/supervacuus/goblin.git", branch = "feat/add_parse_imports_pe_option" }

symbolic-debuginfo/src/pe.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ impl<'data> PeObject<'data> {
8484
/// Tries to parse a PE object from the given slice.
8585
pub fn parse(data: &'data [u8]) -> Result<Self, PeError> {
8686
let opts = pe::options::ParseOptions::default()
87-
.with_parse_mode(goblin::pe::options::ParseMode::Permissive);
87+
.with_parse_mode(goblin::pe::options::ParseMode::Permissive)
88+
.with_parse_imports(false);
8889
let pe = pe::PE::parse_with_opts(data, &opts).map_err(PeError::new)?;
8990
let is_stub = is_pe_stub(&pe);
9091
Ok(PeObject { pe, data, is_stub })

0 commit comments

Comments
 (0)