mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
DiscIO: Add out of bounds checks for blob reading
This commit is contained in:
@ -96,6 +96,9 @@ const SectorReader::Cache* SectorReader::GetCacheLine(u64 block_num)
|
||||
|
||||
bool SectorReader::Read(u64 offset, u64 size, u8* out_ptr)
|
||||
{
|
||||
if (offset + size > GetDataSize())
|
||||
return false;
|
||||
|
||||
u64 remain = size;
|
||||
u64 block = 0;
|
||||
u32 position_in_block = static_cast<u32>(offset % m_block_size);
|
||||
|
Reference in New Issue
Block a user