From 0b22d8f56ccd056ff2fdd967f69681c167cd9ea7 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 6 Jul 2014 22:42:14 -0700 Subject: [PATCH] Check for missing SAVEDATA_PARAMS. --- Core/Dialog/SavedataParam.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Core/Dialog/SavedataParam.cpp b/Core/Dialog/SavedataParam.cpp index 021afc814..58034dd97 100644 --- a/Core/Dialog/SavedataParam.cpp +++ b/Core/Dialog/SavedataParam.cpp @@ -1599,6 +1599,9 @@ int SavedataParam::GetSaveCryptMode(SceUtilitySavedataParam* param, const std::s // save created in PPSSPP and not encrypted has '0' in SAVEDATA_PARAMS u32 tmpDataSize = 0; const u8 *tmpDataOrig = sfoFile.GetValueData("SAVEDATA_PARAMS", &tmpDataSize); + if (tmpDataSize == 0 || !tmpDataOrig) { + return 0; + } switch (tmpDataOrig[0]) { case 0: return 0;