mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-15 15:26:19 -04:00
Fix image offset calculation with early matches
This commit is contained in:
parent
aa92e69d10
commit
0a992d41c2
@ -72,8 +72,8 @@ class filesystem_parser {
|
||||
break;
|
||||
}
|
||||
|
||||
off_t pos =
|
||||
static_cast<uint8_t const*>(pc) - static_cast<uint8_t const*>(ps);
|
||||
off_t pos = start + static_cast<uint8_t const*>(pc) -
|
||||
static_cast<uint8_t const*>(ps);
|
||||
|
||||
if (pos + sizeof(file_header) >= mm.size()) {
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user