diff options
| author | Matthew Parlane <parlane@gmail.com> | 2017-01-24 10:02:09 +1300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-24 10:02:09 +1300 |
| commit | bd2881ff867fc9436bb206c46efa5bd015e00e23 (patch) | |
| tree | da5476609d355f59217253e88131e954a7d0e648 /Source/Core/DiscIO/NANDContentLoader.cpp | |
| parent | 86b758d7caa0ddbd34f01051e61c8ee68b6f89f9 (diff) | |
| parent | 3d21280ab415005f0fbe1dd92e3c8301094b044b (diff) | |
Merge pull request #4736 from leoetlino/oob
DiscIO: Fix out-of-bounds access in NANDContentDataBuffer
Diffstat (limited to 'Source/Core/DiscIO/NANDContentLoader.cpp')
| -rw-r--r-- | Source/Core/DiscIO/NANDContentLoader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/DiscIO/NANDContentLoader.cpp b/Source/Core/DiscIO/NANDContentLoader.cpp index f87e0e31c0..b57f6eb0ea 100644 --- a/Source/Core/DiscIO/NANDContentLoader.cpp +++ b/Source/Core/DiscIO/NANDContentLoader.cpp @@ -196,7 +196,7 @@ bool CNANDContentDataBuffer::GetRange(u32 start, u32 size, u8* buffer) if (start + size > m_buffer.size()) return false; - std::copy(&m_buffer[start], &m_buffer[start + size], buffer); + std::copy_n(&m_buffer[start], size, buffer); return true; } |
