mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-30 11:35:39 +00:00
Fixup IsValidPSExeHeader
This commit is contained in:
parent
48ddebd82e
commit
bcbe93a462
|
@ -246,7 +246,7 @@ bool IsValidPSExeHeader(const PSEXEHeader& header, u32 file_size)
|
||||||
if (std::memcmp(header.id, expected_id, sizeof(expected_id)) != 0)
|
if (std::memcmp(header.id, expected_id, sizeof(expected_id)) != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (header.file_size > (sizeof(PSEXEHeader) + file_size))
|
if ((header.file_size + sizeof(PSEXEHeader)) > file_size)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue