summaryrefslogtreecommitdiff
path: root/vm/vm_map.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2012-11-20 23:17:12 +0000
committerRichard Braun <rbraun@sceen.net>2012-11-20 23:17:12 +0000
commit7aa475db4ce168401167dc2ffed6221493ae2db4 (patch)
tree553790cd9090fa49e1bba3cbdade93bdacafd012 /vm/vm_map.c
parentbdae52f1465743ad96b2261e053ae4967f807557 (diff)
Fix calls to vm_map when size is 0
* vm/vm_map.c (vm_map_enter): return KERN_INVALID_ARGUMENT if size is 0. * vm/vm_user.c (vm_map): Likewise.
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;