mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-25 16:24:53 +02:00
Io: Truncate reads/writes to valid memory.
A PSP might crash in these cases, but it's better if we avoid a crash.
This commit is contained in:
@@ -417,7 +417,7 @@ int ISOFileSystem::Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outd
|
||||
return SCE_KERNEL_ERROR_ERRNO_INVALID_ARGUMENT;
|
||||
} else {
|
||||
int block = (u16)desc.firstLETableSector;
|
||||
u32 size = (u32)desc.pathTableLength;
|
||||
u32 size = Memory::ValidSize(outdataPtr, (u32)desc.pathTableLength);
|
||||
u8 *out = Memory::GetPointer(outdataPtr);
|
||||
|
||||
int blocks = size / blockDevice->GetBlockSize();
|
||||
|
||||
Reference in New Issue
Block a user