diff options
| author | Tilka <tilkax@gmail.com> | 2020-01-15 13:48:00 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-15 13:48:00 +0000 |
| commit | 1cc7ef356b9a33814efb290368150a1cceb0a3ed (patch) | |
| tree | 3033a500319e754fb089ff22bc9bd89a40c41d2e /Source/Core/DiscIO/CISOBlob.cpp | |
| parent | 1ac3264d5d5c21b6b5ac9eb5a756e7cf142423c8 (diff) | |
| parent | 297b790e4f14be284df39d5ac67e59527df41e29 (diff) | |
Merge pull request #8558 from JosJuice/volume-oob
DiscIO: Add out of bounds checks for blob reading
Diffstat (limited to 'Source/Core/DiscIO/CISOBlob.cpp')
| -rw-r--r-- | Source/Core/DiscIO/CISOBlob.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Core/DiscIO/CISOBlob.cpp b/Source/Core/DiscIO/CISOBlob.cpp index 8de921e8e1..db55946136 100644 --- a/Source/Core/DiscIO/CISOBlob.cpp +++ b/Source/Core/DiscIO/CISOBlob.cpp @@ -49,6 +49,9 @@ u64 CISOFileReader::GetRawSize() const bool CISOFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr) { + if (offset + nbytes > GetDataSize()) + return false; + while (nbytes != 0) { u64 const block = offset / m_block_size; |
