Don't try to read outside the SAVEDATA_FILE_LIST.

This commit is contained in:
Unknown W. Brackets 2013-05-31 23:13:48 -07:00
parent 06c19622d5
commit ae5fad2b39

View File

@ -897,9 +897,9 @@ int SavedataParam::GetFilesList(SceUtilitySavedataParam *param)
char temp[14];
temp[13] = '\0';
for (int i = 0; i < FILE_LIST_COUNT_MAX; ++i) {
for (u32 i = 0; i < FILE_LIST_COUNT_MAX; ++i) {
// Ends at a NULL filename.
if (sfoFileList[i * FILE_LIST_ITEM_SIZE] == '\0') {
if (i * FILE_LIST_ITEM_SIZE >= sfoFileListSize || sfoFileList[i * FILE_LIST_ITEM_SIZE] == '\0') {
break;
}