m4b / goblin

An impish, cross-platform binary parsing crate, written in Rust
MIT License
1.2k stars 160 forks source link

pe.parse: added header signature check #286

Closed skdltmxn closed 3 years ago

skdltmxn commented 3 years ago

I added header signature check logics for PE binaries. Now PE::parse does not panic but returns error::Error::Malformed if either DOS or PE header has incorrect signature value. I also added two tests.

This PR fixes #283