mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-16 07:46:27 -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;
|
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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user