Skip to content

Commit

Permalink
Remove the last partition in ME 6
Browse files Browse the repository at this point in the history
The last partition in ME 6 has 0xffffffff as size and was previously
ignored by me_cleaner.
  • Loading branch information
corna committed Jan 31, 2018
1 parent 2d8b619 commit 5bd27b3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions me_cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,12 @@ def start_end_to_flreg(start, end):
part_name = "????"

part_start, part_length = unpack("<II", partition[0x08:0x10])

# ME 6: the last partition has 0xffffffff as size
if variant == "ME" and version[0] == 6 and \
i == entries - 1 and part_length == 0xffffffff:
part_length = me_end - part_start

part_end = part_start + part_length

if flags & 0x7f == 2:
Expand Down

0 comments on commit 5bd27b3

Please sign in to comment.