mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-11 09:18:40 +12:00
IsGood() check elimination
Reasons: 1) It's unsafe - we cannot guarantee that address is still good while it is used. 2) It's wrong in many modules which are usually just compare pointer with zero.
This commit is contained in:
parent
48514b0e93
commit
8f04ab07ed
52 changed files with 104 additions and 1450 deletions
|
@ -105,11 +105,6 @@ int sys_spu_image_import(mem_ptr_t<sys_spu_image> img, u32 src, u32 type)
|
|||
{
|
||||
sysPrxForUser->Warning("sys_spu_image_import(img=0x%x, src=0x%x, type=0x%x)", img.GetAddr(), src, type);
|
||||
|
||||
if(!img.IsGood() || !Memory.IsGoodAddr(src))
|
||||
{
|
||||
return CELL_EFAULT;
|
||||
}
|
||||
|
||||
vfsStreamMemory f(src);
|
||||
u32 entry;
|
||||
u32 offset = LoadSpuImage(f, entry);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue