cellSave fix plus bugfixes (#2631)

* cellSave fix plus bugfixes

allows allocation of last byte in memory block
prevents rpcs3 from crashing when closing non existent socket

* Fix overflow

* add more socket options
fix typo

prevent sys_net from operating on nullptr sockets
This commit is contained in:
Inviuz 2017-04-05 15:08:58 +02:00 committed by Ivan
parent 1ae334e500
commit 22e679e23e
3 changed files with 86 additions and 1 deletions

View file

@ -621,7 +621,7 @@ namespace vm
size = ::align(size, 4096);
// return if addr or size is invalid
if (!size || size > this->size || addr < this->addr || addr + size - 1 >= this->addr + this->size - 1)
if (!size || size > this->size || addr < this->addr || addr + size - 1 > this->addr + this->size - 1)
{
return 0;
}