From 3f3ce53c6751e6ef79b01b2705f2382b07013a5a Mon Sep 17 00:00:00 2001 From: Eladash Date: Sat, 9 Nov 2019 08:09:11 +0200 Subject: [PATCH] Fix string length check in cellGameThemeInstall vm::ptr::size() returns sizeof type instead. --- rpcs3/Emu/Cell/Modules/cellGame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/Modules/cellGame.cpp b/rpcs3/Emu/Cell/Modules/cellGame.cpp index 9a246860bc..0b7741435f 100644 --- a/rpcs3/Emu/Cell/Modules/cellGame.cpp +++ b/rpcs3/Emu/Cell/Modules/cellGame.cpp @@ -965,7 +965,7 @@ s32 cellGameThemeInstall(vm::cptr usrdirPath, vm::cptr fileName, u32 { cellGame.todo("cellGameThemeInstall(usrdirPath=%s, fileName=%s, option=0x%x)", usrdirPath, fileName, option); - if (!fileName || !usrdirPath || usrdirPath.size() > CELL_GAME_PATH_MAX) + if (!fileName || !usrdirPath || !memchr(usrdirPath.get_ptr(), '\0', CELL_GAME_PATH_MAX)) { return CELL_GAME_ERROR_PARAM; }