mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-01 23:12:35 +00:00
Fix segfault when unable to find PFSCOffset in pfs_image
This commit is contained in:
parent
95d58b8b18
commit
ba89552373
@ -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…
Reference in New Issue
Block a user