mirror of https://github.com/PCSX2/pcsx2.git
GzippedFileReader: Don't write OOB in last chunk
zlib_indexed can write the full span to the block, despite the length being shorter. This code can die in a fire. Closes #11398.
This commit is contained in:
parent
9c57ac34e3
commit
6fcd5d0aff
|
@ -223,7 +223,7 @@ ThreadedFileReader::Chunk GzippedFileReader::ChunkForOffset(u64 offset)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
chunk.chunkID = static_cast<s64>(offset) / m_index->span;
|
chunk.chunkID = static_cast<s64>(offset) / m_index->span;
|
||||||
chunk.length = static_cast<u32>(std::min<u64>(m_index->uncompressed_size - offset, m_index->span));
|
chunk.length = m_index->span;
|
||||||
chunk.offset = static_cast<u64>(chunk.chunkID) * m_index->span;
|
chunk.offset = static_cast<u64>(chunk.chunkID) * m_index->span;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue