sys_prx: Improve sys_prx_get_module_info error checking

This commit is contained in:
Eladash 2021-09-15 20:33:31 +03:00 committed by Ivan
parent ae4f837f57
commit 9c2d94ca1a

View file

@ -801,7 +801,17 @@ error_code _sys_prx_get_module_info(ppu_thread& ppu, u32 id, u64 flags, vm::ptr<
return CELL_EFAULT; 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; return CELL_EINVAL;
} }