avast / authenticode-parser

Authenticode-parser is a simple C library for Authenticode format parsing using OpenSSL.
MIT License
16 stars 8 forks source link

Fix overflow when parsing PE file #3

Closed HoundThe closed 2 years ago

HoundThe commented 2 years ago

Solves #2

This PR stops overflow to 0 from happening when adding two 32bit numbers when calculating file offset that is used to check if we can read that far.

I've also added an extra check if the file has even a DOS "MZ" header.