Don't allow creating areas with a size of 0 bytes, courtesy of Vasilis Kaoutsis.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20789 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -737,6 +737,8 @@ vm_create_anonymous_area(team_id aid, const char *name, void **address,
|
|||||||
|
|
||||||
TRACE(("create_anonymous_area %s: size 0x%lx\n", name, size));
|
TRACE(("create_anonymous_area %s: size 0x%lx\n", name, size));
|
||||||
|
|
||||||
|
if (size == 0)
|
||||||
|
return B_BAD_VALUE;
|
||||||
if (!arch_vm_supports_protection(protection))
|
if (!arch_vm_supports_protection(protection))
|
||||||
return B_NOT_SUPPORTED;
|
return B_NOT_SUPPORTED;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user