summaryrefslogtreecommitdiff
path: root/vm/vm_map.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm/vm_map.c')
-rw-r--r--vm/vm_map.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vm/vm_map.c b/vm/vm_map.c
index c46afc0..22fa836 100644
--- a/vm/vm_map.c
+++ b/vm/vm_map.c
@@ -784,6 +784,9 @@ kern_return_t vm_map_enter(
#define RETURN(value) { result = value; goto BailOut; }
+ if (size == 0)
+ return KERN_INVALID_ARGUMENT;
+
StartAgain: ;
start = *address;