From 91a7775d68f5f8ca7aae0f5c03b2c39b83e0a895 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 21 Feb 2021 16:51:38 +1000 Subject: [PATCH] BIOS: Fix size validation for PSExe --- src/core/bios.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/bios.cpp b/src/core/bios.cpp index 5ba8b3222..2799e337b 100644 --- a/src/core/bios.cpp +++ b/src/core/bios.cpp @@ -246,7 +246,7 @@ bool IsValidPSExeHeader(const PSEXEHeader& header, u32 file_size) if (std::memcmp(header.id, expected_id, sizeof(expected_id)) != 0) return false; - if (header.file_size > file_size) + if (header.file_size > (sizeof(PSEXEHeader) + file_size)) return false; return true;