mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-29 19:30:48 +00:00
Don't try to read outside the SAVEDATA_FILE_LIST.
This commit is contained in:
parent
06c19622d5
commit
ae5fad2b39
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user