From d4285fb196dbb1939958a6f1bbbd17e1f39b7571 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Tue, 12 Jun 2018 21:32:40 +0200 Subject: [PATCH] cellGameExec: add param checks --- rpcs3/Emu/Cell/Modules/cellGameExec.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/rpcs3/Emu/Cell/Modules/cellGameExec.cpp b/rpcs3/Emu/Cell/Modules/cellGameExec.cpp index 96f82c32ed..9bf583b867 100644 --- a/rpcs3/Emu/Cell/Modules/cellGameExec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGameExec.cpp @@ -15,6 +15,11 @@ s32 cellGameGetHomeDataExportPath(vm::ptr exportPath) { cellGameExec.warning("cellGameGetHomeDataExportPath(exportPath=*0x%x)", exportPath); + if (!exportPath) + { + return CELL_GAME_ERROR_PARAM; + } + // TODO: PlayStation home is defunct. return CELL_GAME_ERROR_NOAPP; @@ -30,6 +35,11 @@ s32 cellGameGetHomeDataImportPath(vm::ptr importPath) { cellGameExec.warning("cellGameGetHomeDataImportPath(importPath=*0x%x)", importPath); + if (!importPath) + { + return CELL_GAME_ERROR_PARAM; + } + // TODO: PlayStation home is defunct. return CELL_GAME_ERROR_NOAPP; @@ -39,6 +49,11 @@ s32 cellGameGetHomeLaunchOptionPath(vm::ptr commonPath, vm::ptr pers { cellGameExec.todo("cellGameGetHomeLaunchOptionPath(commonPath=%s, personalPath=%s)", commonPath, personalPath); + if (!commonPath || !personalPath) + { + return CELL_GAME_ERROR_PARAM; + } + // TODO: PlayStation home is not supported atm. return CELL_GAME_ERROR_NOAPP; } @@ -47,6 +62,11 @@ s32 cellGameGetBootGameInfo(vm::ptr type, vm::ptr dirName, vm::ptr