[nx] Safer FacBinary size calculation in FacHeader.

This commit is contained in:
jakcron 2017-07-07 09:57:50 +10:00
parent 64035225d8
commit 5bd5178a7d

View file

@ -86,7 +86,7 @@ void FacHeader::importBinary(const u8 * bytes, size_t len)
u64 FacHeader::getFacSize() const
{
return getSaveDataOwnerIdOffset() + getSaveDataOwnerIdSize();
return MAX(getSaveDataOwnerIdOffset() + getSaveDataOwnerIdSize(), getContentOwnerIdOffset() + getContentOwnerIdSize());
}
u64 FacHeader::getFsaRights() const