diff options
| author | Mason Reed <mason@vector35.com> | 2025-02-06 23:58:33 -0500 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-02-06 23:58:33 -0500 |
| commit | f9bd8eb2a8aa8b492d4145624d12e7014c7ee65c (patch) | |
| tree | 2d9fa45c718eab1bb373a290eddfa7e38d806faa /rust/src/binary_reader.rs | |
| parent | 3fd8d8123d52330dc1fae22371c4b4298f709eba (diff) | |
Fix BinaryReader and BinaryWriter not respecting image base in Rust API
Diffstat (limited to 'rust/src/binary_reader.rs')
| -rw-r--r-- | rust/src/binary_reader.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rust/src/binary_reader.rs b/rust/src/binary_reader.rs index da29b515..1ee4e73e 100644 --- a/rust/src/binary_reader.rs +++ b/rust/src/binary_reader.rs @@ -105,6 +105,8 @@ impl Seek for BinaryReader { SeekFrom::Current(offset) => self.seek_to_relative_offset(offset), SeekFrom::Start(offset) => self.seek_to_offset(offset), SeekFrom::End(end_offset) => { + // We do NOT need to add the image base here as + // the reader (unlike the writer) can set the virtual base. let offset = self.view .len() |
