Merge pull request #4736 from leoetlino/oob
DiscIO: Fix out-of-bounds access in NANDContentDataBuffer
This commit is contained in:
commit
bd2881ff86
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue