mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-25 08:14:45 +02:00
Report any attempt to read a negative size.
If this should return an error, that should be handled in sceIo.
This commit is contained in:
@@ -528,9 +528,13 @@ size_t ISOFileSystem::ReadFile(u32 handle, u8 *pointer, s64 size)
|
||||
size_t ISOFileSystem::ReadFile(u32 handle, u8 *pointer, s64 size, int &usec)
|
||||
{
|
||||
EntryMap::iterator iter = entries.find(handle);
|
||||
if (iter != entries.end())
|
||||
{
|
||||
if (iter != entries.end()) {
|
||||
OpenFileEntry &e = iter->second;
|
||||
|
||||
if (size < 0) {
|
||||
ERROR_LOG_REPORT(FILESYS, "Invalid read for %lld bytes from umd %s", size, e.file ? e.file->name.c_str() : "device");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (e.isBlockSectorMode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user