diff options
-rw-r--r-- | lib/libc/sys/mmap.2 | 4 | ||||
-rw-r--r-- | sys/vm/vm_mmap.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/sys/mmap.2 b/lib/libc/sys/mmap.2 index 196d6ae..91bf4e9 100644 --- a/lib/libc/sys/mmap.2 +++ b/lib/libc/sys/mmap.2 @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd October 24, 2008 +.Dd July 14, 2009 .Dt MMAP 2 .Os .Sh NAME @@ -306,7 +306,7 @@ resides out of the valid address space for a user process. The .Fa len argument -was negative. +was equal to zero. .It Bq Er EINVAL .Dv MAP_ANON was specified and the diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index cc7a0f4..2b99e36 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -229,7 +229,7 @@ mmap(td, uap) fp = NULL; /* make sure mapping fits into numeric range etc */ - if ((ssize_t) uap->len < 0 || + if (uap->len == 0 || ((flags & MAP_ANON) && uap->fd != -1)) return (EINVAL); |