Skip to content

Commit

Permalink
pe(data_directories): improve errors with offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
RaitoBezarius committed Oct 7, 2023
1 parent 2675685 commit 34c251f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pe/data_directories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl DataDirectory {
let end = start + usize::try_from(self.inner.size)?;

Ok(pe.get(start..end).ok_or(error::Error::Malformed(
"Invalid data directory range".into(),
format!("Invalid data directory range ({start}..{end})"),
))?)
}
}
Expand Down

0 comments on commit 34c251f

Please sign in to comment.