mirror of
https://github.com/encounter/object.git
synced 2026-07-10 12:18:39 -07:00
read/pe: check for empty import names (#873)
This commit is contained in:
@@ -92,6 +92,8 @@ impl<'data> ImportTable<'data> {
|
||||
.get(LE);
|
||||
let name = data
|
||||
.read_string()
|
||||
.ok()
|
||||
.filter(|s| !s.is_empty())
|
||||
.read_error("Missing PE import thunk name")?;
|
||||
Ok((hint, name))
|
||||
}
|
||||
@@ -331,6 +333,8 @@ impl<'data> DelayLoadImportTable<'data> {
|
||||
.get(LE);
|
||||
let name = data
|
||||
.read_string()
|
||||
.ok()
|
||||
.filter(|s| !s.is_empty())
|
||||
.read_error("Missing PE delay load import thunk name")?;
|
||||
Ok((hint, name))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user