mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 22:47:03 +00:00
sys_rsx/cellgcm: return EINVAL if the io map requast's size is 0
This commit is contained in:
parent
0a7902d313
commit
97515a0941
3 changed files with 9 additions and 11 deletions
|
|
@ -18,8 +18,6 @@ bool VirtualMemoryBlock::IsInMyRange(const u32 addr, const u32 size)
|
|||
|
||||
u32 VirtualMemoryBlock::Map(u32 realaddr, u32 size)
|
||||
{
|
||||
verify(HERE), (size);
|
||||
|
||||
for (u32 addr = m_range_start; addr <= m_range_start + m_range_size - 1 - GetReservedAmount() - size;)
|
||||
{
|
||||
bool is_good_addr = true;
|
||||
|
|
@ -48,9 +46,7 @@ u32 VirtualMemoryBlock::Map(u32 realaddr, u32 size)
|
|||
|
||||
bool VirtualMemoryBlock::Map(u32 realaddr, u32 size, u32 addr)
|
||||
{
|
||||
verify(HERE), (size);
|
||||
|
||||
if (!IsInMyRange(addr, size))
|
||||
if (!size || !IsInMyRange(addr, size))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue