Skip to content

Commit

Permalink
fix: avoid panic while scanning some corrupted PE files
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed Aug 5, 2024
1 parent 730e033 commit 3f011ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/src/modules/pe/authenticode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,11 @@ impl AuthenticodeParser {
authenticode_hasher.hash(&mut sha512);
sha512.finalize().to_vec()
}
oid => unimplemented!("{:?}", oid),
_ => {
#[cfg(feature = "logging")]
error!("unknown digest algorithm: {:?}", digest_algorithm);
return Err(ParseError::InvalidDigestAlgorithm);
}
};

let authenticode_digest = indirect_data.message_digest;
Expand Down

0 comments on commit 3f011ee

Please sign in to comment.