Skip to content

Commit 342848c

Browse files
authored
fix: skip uninterpretable PE files during relinking (#1908)
1 parent 4fc74d1 commit 342848c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/windows/link.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ impl Dll {
7878
tracing::warn!("[relink/windows] Skipping malformed PE file {path:?}: {e}");
7979
Ok(None)
8080
}
81+
goblin::error::Error::Scroll(_) => {
82+
// A valid PE file but goblin can not reading and interpreting bytes
83+
tracing::warn!("[relink/windows] Skipping uninterpretable PE file {path:?}: {e}");
84+
Ok(None)
85+
}
8186
_ => {
8287
// IO, buffer, scroll errors should bubble up as real system errors
8388
Err(RelinkError::ParseError(e))

0 commit comments

Comments
 (0)