mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2025-01-16 08:32:11 +01:00
Artic Base: Do not use cache if the read would result in OOB
This commit is contained in:
parent
7a807f299a
commit
a672428232
@ -383,7 +383,7 @@ ResultVal<std::size_t> ArticFileBackend::Read(u64 offset, std::size_t length, u8
|
||||
auto cache = cache_provider->ProvideCache(
|
||||
client, cache_provider->PathsToVector(archive_path, file_path), true);
|
||||
|
||||
if (cache != nullptr) {
|
||||
if (cache != nullptr && (offset + static_cast<u64>(length)) < GetSize()) {
|
||||
return cache->Read(file_handle, offset, length, buffer);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user