File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ description = "Find a resource from a PE image without loading it."
13
13
alloc = []
14
14
15
15
[dependencies ]
16
- goblin = {version =" 0.5 " , default-features = false , features =[" pe32" , " pe64" ]}
16
+ goblin = {version =" 0.8 " , default-features = false , features =[" pe32" , " pe64" ]}
17
17
anyhow = { version =" 1" , default-features = false }
18
18
thiserror = " 1"
19
- memmap2 = " 0.5 "
19
+ memmap2 = " 0.9 "
20
20
either = { version =" 1.8" , default-features = false }
21
21
plain = " 0.2"
22
22
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ mod rsrc {
74
74
75
75
unsafe impl Plain for _ImageResourceDataEntry { }
76
76
77
+ #[ allow( dead_code) ]
77
78
#[ derive( Debug , Clone ) ]
78
79
pub struct ImageResourceDirectoryEntry < ' a > {
79
80
pub id : ResourceIdType < ' a > ,
@@ -463,7 +464,12 @@ pub mod parser {
463
464
panic ! ( "file too small: {}" , filename) ;
464
465
}
465
466
466
- let _pe: Result < goblin:: pe:: PE , PEError > = match goblin:: pe:: PE :: parse ( buf)
467
+ let pe_opts = goblin:: pe:: options:: ParseOptions {
468
+ resolve_rva : true ,
469
+ parse_attribute_certificates : false
470
+ } ;
471
+
472
+ let _pe: Result < goblin:: pe:: PE , PEError > = match goblin:: pe:: PE :: parse_with_opts ( buf, & pe_opts)
467
473
. map_err ( |e| PEError :: BadResourceString ( e. to_string ( ) ) )
468
474
{
469
475
Ok ( pe) => {
You can’t perform that action at this time.
0 commit comments