Skip to content

Commit

Permalink
Fix string length check in cellGameThemeInstall
Browse files Browse the repository at this point in the history
vm::ptr::size() returns sizeof type instead.
  • Loading branch information
elad335 authored and Nekotekina committed Nov 10, 2019
1 parent e8cc9d1 commit 3f3ce53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpcs3/Emu/Cell/Modules/cellGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3f3ce53

Please sign in to comment.