mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
Check TMD sizes using the actual constant
0x49e4 is the actual maximum TMD size (which is checked against in ES). IsValidTMDSize is added to ESFormats to avoid duplicating the constant.
This commit is contained in:
parent
f4190ab1c4
commit
b5a2f34a37
5 changed files with 18 additions and 7 deletions
|
@ -41,7 +41,7 @@ CVolumeWAD::CVolumeWAD(std::unique_ptr<IBlobReader> reader) : m_reader(std::move
|
|||
m_opening_bnr_offset =
|
||||
m_tmd_offset + Common::AlignUp(m_tmd_size, 0x40) + Common::AlignUp(m_data_size, 0x40);
|
||||
|
||||
if (m_tmd_size > 1024 * 1024 * 4)
|
||||
if (!IOS::ES::IsValidTMDSize(m_tmd_size))
|
||||
{
|
||||
ERROR_LOG(DISCIO, "TMD is too large: %u bytes", m_tmd_size);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue