Skip to content

Commit 14be69c

Browse files
committed
fix idb_import invalid offset in EoF hit
1 parent 412b135 commit 14be69c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plugins/idb_import/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ struct BinaryViewReader<'a> {
8686
impl std::io::Read for BinaryViewReader<'_> {
8787
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
8888
if !self.bv.offset_valid(self.offset) {
89+
// TODO check if this is truly a EoF hit, `self.bv.len()` is not
90+
// reliable, it's returning a size bigger then the original file.
8991
return Ok(0);
9092
}
9193
let len = BinaryView::read(self.bv, buf, self.offset);

0 commit comments

Comments
 (0)