Skip to content

Commit

Permalink
Fix bug in Ubi identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
whyitfor committed Dec 14, 2024
1 parent 6d053dd commit 47c1486
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ofrak_core/ofrak/core/ubi.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ async def pack(self, resource: Resource, config=None) -> None:
def match_ubi_magic(data: bytes) -> bool:
if len(data) < 4:
return False
return data in [UBI_EC_HDR_MAGIC, UBI_VID_HDR_MAGIC]
return data[:4] in [UBI_EC_HDR_MAGIC, UBI_VID_HDR_MAGIC]


RawMagicIdentifier.register(Ubi, match_ubi_magic)

0 comments on commit 47c1486

Please sign in to comment.