Fix image offset calculation with early matches

This commit is contained in:
Marcus Holland-Moritz 2021-03-28 10:25:30 +02:00
parent aa92e69d10
commit 0a992d41c2

View File

@ -72,8 +72,8 @@ class filesystem_parser {
break; break;
} }
off_t pos = off_t pos = start + static_cast<uint8_t const*>(pc) -
static_cast<uint8_t const*>(pc) - static_cast<uint8_t const*>(ps); static_cast<uint8_t const*>(ps);
if (pos + sizeof(file_header) >= mm.size()) { if (pos + sizeof(file_header) >= mm.size()) {
break; break;