Use a PSPPointer in the FILELIST savedata mode.

This commit is contained in:
Unknown W. Brackets 2013-06-02 15:17:02 -07:00
parent 9eea30c52d
commit 5027e24150
2 changed files with 4 additions and 4 deletions

View File

@ -844,13 +844,13 @@ int SavedataParam::GetFilesList(SceUtilitySavedataParam *param)
return SCE_UTILITY_SAVEDATA_ERROR_RW_BAD_STATUS;
}
if (!Memory::IsValidAddress(param->fileListAddr)) {
ERROR_LOG_REPORT(HLE, "SavedataParam::GetFilesList(): bad fileList address %08x", param->fileListAddr);
if (!param->fileList.Valid()) {
ERROR_LOG_REPORT(HLE, "SavedataParam::GetFilesList(): bad fileList address %08x", param->fileList.ptr);
// Should crash.
return -1;
}
auto fileList = Memory::GetStruct<SceUtilitySavedataFileListInfo>(param->fileListAddr);
auto &fileList = param->fileList;
if (fileList->secureEntries.Valid() && fileList->maxSecureEntries > 99) {
ERROR_LOG_REPORT(HLE, "SavedataParam::GetFilesList(): too many secure entries, %d", fileList->maxSecureEntries);
return SCE_UTILITY_SAVEDATA_ERROR_RW_BAD_PARAMS;

View File

@ -186,7 +186,7 @@ struct SceUtilitySavedataParam
u32 idListAddr;
// Function 12 FILES
u32 fileListAddr;
PSPPointer<SceUtilitySavedataFileListInfo> fileList;
// Function 22 GETSIZES
u32 sizeAddr;