Fix string length check in cellGameThemeInstall

vm::ptr::size() returns sizeof type instead.
This commit is contained in:
Eladash 2019-11-09 08:09:11 +02:00 committed by Ivan
parent e8cc9d1f52
commit 3f3ce53c67

View File

@ -965,7 +965,7 @@ s32 cellGameThemeInstall(vm::cptr<char> usrdirPath, vm::cptr<char> 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;
}