Skip to content

Commit e370f79

Browse files
kkent030315x0rb3l
andauthored
PE: fix loaf config parser out of bounds (#483)
Co-authored-by: Robel Campbell <[email protected]>
1 parent cfe9c26 commit e370f79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pe/load_config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ impl LoadConfigData {
336336
dd.virtual_address
337337
))
338338
})?;
339-
let bytes = bytes[offset..]
340-
.pread_with::<&[u8]>(0, dd.size as usize)
339+
let bytes = bytes
340+
.pread_with::<&[u8]>(offset, dd.size as usize)
341341
.map_err(|_| {
342342
error::Error::Malformed(format!(
343343
"load config offset {:#x} and size {:#x} exceeds the bounds of the bytes size {:#x}",

0 commit comments

Comments
 (0)