Current version of goblin parses section names as indirect even on PE. The indirect section name is only a feature in COFF so we should avoid parsing it when it's PE and instead parse the name in UTF-8.
|
pub fn name_offset(&self) -> error::Result<Option<usize>> { |
|
// Based on https://github.com/llvm-mirror/llvm/blob/af7b1832a03ab6486c42a40d21695b2c03b2d8a3/lib/Object/COFFObjectFile.cpp#L1054 |
|
if self.name[0] == b'/' { |
|
let idx: usize = if self.name[1] == b'/' { |
|
let b64idx = self.name.pread::<&str>(2)?; |
Current version of goblin parses section names as indirect even on PE. The indirect section name is only a feature in COFF so we should avoid parsing it when it's PE and instead parse the name in UTF-8.
goblin/src/pe/section_table.rs
Lines 113 to 117 in baae69e