BIOS: Fix size validation for PSExe

This commit is contained in:
Connor McLaughlin 2021-02-21 16:51:38 +10:00
parent 13b0946efd
commit 91a7775d68
1 changed files with 1 additions and 1 deletions

View File

@ -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 > file_size) if (header.file_size > (sizeof(PSEXEHeader) + file_size))
return false; return false;
return true; return true;