Skip to content

Commit

Permalink
sys_prx: Improve sys_prx_get_module_info error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
elad335 authored and Nekotekina committed Sep 16, 2021
1 parent ae4f837 commit 9c2d94c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion rpcs3/Emu/Cell/lv2/sys_prx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,17 @@ error_code _sys_prx_get_module_info(ppu_thread& ppu, u32 id, u64 flags, vm::ptr<
return CELL_EFAULT;
}

if (pOpt->size != pOpt.size() || !pOpt->info)
if (pOpt->size != pOpt.size())
{
return CELL_EINVAL;
}

if (!pOpt->info)
{
return CELL_EFAULT;
}

if (pOpt->info->size != pOpt->info.size())
{
return CELL_EINVAL;
}
Expand Down

0 comments on commit 9c2d94c

Please sign in to comment.