mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00:00
DiscIO: Add out of bounds checks for blob reading
This commit is contained in:
parent
31d7b56c19
commit
297b790e4f
4 changed files with 15 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue