mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-21 20:14:45 +00:00
Fix segfault when unable to find PFSCOffset in pfs_image
This commit is contained in:
parent
95d58b8b18
commit
ba89552373
1 changed files with 6 additions and 0 deletions
|
@ -258,6 +258,12 @@ bool PKG::Extract(const std::filesystem::path& filepath, const std::filesystem::
|
|||
|
||||
// Retrieve PFSC from decrypted pfs_image.
|
||||
pfsc_offset = GetPFSCOffset(pfs_decrypted);
|
||||
if (pfsc_offset == (u32)-1)
|
||||
{
|
||||
failreason = "Could not retrieve PFSC from decrypted pfs_image";
|
||||
return false;
|
||||
}
|
||||
|
||||
std::memcpy(pfsc.data(), pfs_decrypted.data() + pfsc_offset, length - pfsc_offset);
|
||||
|
||||
PFSCHdr pfsChdr;
|
||||
|
|
Loading…
Add table
Reference in a new issue