mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 07:20:49 +00:00
Savedata: Return error when bufSize is too small.
Mirrors what a PSP does.
This commit is contained in:
parent
718053e7fc
commit
42feade460
@ -362,6 +362,10 @@ int SavedataParam::Save(SceUtilitySavedataParam* param, const std::string &saveD
|
||||
if (!param) {
|
||||
return SCE_UTILITY_SAVEDATA_ERROR_SAVE_MS_NOSPACE;
|
||||
}
|
||||
if (param->dataSize > param->dataBufSize) {
|
||||
ERROR_LOG_REPORT(SCEUTILITY, "Savedata buffer overflow: %d / %d", param->dataSize, param->dataBufSize);
|
||||
return SCE_UTILITY_SAVEDATA_ERROR_RW_BAD_PARAMS;
|
||||
}
|
||||
if (param->secureVersion > 3) {
|
||||
ERROR_LOG_REPORT(SCEUTILITY, "Savedata version requested on save: %d", param->secureVersion);
|
||||
return SCE_UTILITY_SAVEDATA_ERROR_SAVE_PARAM;
|
||||
|
Loading…
Reference in New Issue
Block a user