Skip to content

Commit 8705e7c

Browse files
committed
Draft: support Goblin 0.10
1 parent 6e9a7fe commit 8705e7c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyo3-introspection/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ edition = "2021"
1010

1111
[dependencies]
1212
anyhow = "1"
13-
goblin = "0.9.0"
13+
goblin = ">=0.9, <0.11"
1414
serde = { version = "1", features = ["derive"] }
1515
serde_json = "1"
1616
unicode-ident = "1"

pyo3-introspection/src/introspection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ fn find_introspection_chunks_in_pe(pe: &PE<'_>, library_content: &[u8]) -> Resul
328328
.iter()
329329
.find(|section| section.name().unwrap_or_default() == ".rdata")
330330
.context("No .rdata section found")?;
331-
let rdata_shift = pe.image_base
331+
let rdata_shift = usize::try_from(pe.image_base).context(".rdata virtual_address overflow")?
332332
+ usize::try_from(rdata_data_section.virtual_address)
333333
.context(".rdata virtual_address overflow")?
334334
- usize::try_from(rdata_data_section.pointer_to_raw_data)

0 commit comments

Comments
 (0)