sys_rsx/cellgcm: return EINVAL if the io map requast's size is 0

This commit is contained in:
eladash 2018-05-19 15:46:29 +03:00 committed by kd-11
parent 0a7902d313
commit 97515a0941
3 changed files with 9 additions and 11 deletions

View file

@ -992,8 +992,7 @@ s32 cellGcmMapMainMemory(u32 ea, u32 size, vm::ptr<u32> offset)
{
cellGcmSys.warning("cellGcmMapMainMemory(ea=0x%x, size=0x%x, offset=*0x%x)", ea, size, offset);
if (size == 0) return CELL_OK;
if ((ea & 0xFFFFF) || (size & 0xFFFFF)) return CELL_GCM_ERROR_FAILURE;
if (!size || (ea & 0xFFFFF) || (size & 0xFFFFF)) return CELL_GCM_ERROR_FAILURE;
u32 io = RSXIOMem.Map(ea, size);