diff options
author | swallace <swallace@FreeBSD.org> | 1996-12-12 17:57:50 +0000 |
---|---|---|
committer | swallace <swallace@FreeBSD.org> | 1996-12-12 17:57:50 +0000 |
commit | 469f32f784e57c3101f9c364a8b7dd1c561176e5 (patch) | |
tree | 1995e9719f84b8bb9cd1b2f0261d2e2046a523a4 | |
parent | c69e47ec94a9494ada0519b5453daf5374b8412d (diff) | |
download | FreeBSD-src-469f32f784e57c3101f9c364a8b7dd1c561176e5.zip FreeBSD-src-469f32f784e57c3101f9c364a8b7dd1c561176e5.tar.gz |
Soften range-check for LDTs.
Reviewed by: bde
-rw-r--r-- | sys/amd64/amd64/sys_machdep.c | 4 | ||||
-rw-r--r-- | sys/i386/i386/sys_machdep.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c index ebe033f..a012b63 100644 --- a/sys/amd64/amd64/sys_machdep.c +++ b/sys/amd64/amd64/sys_machdep.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91 - * $Id: sys_machdep.c,v 1.16 1996/06/12 05:02:53 gpalmer Exp $ + * $Id: sys_machdep.c,v 1.17 1996/08/12 19:57:10 wollman Exp $ * */ @@ -200,7 +200,7 @@ i386_set_ldt(p, args, retval) #endif /* verify range of descriptors to modify */ - if ((uap->start < NLDT) || (uap->start >= MAX_LD) || (uap->num < 0) || + if ((uap->start < 0) || (uap->start >= MAX_LD) || (uap->num < 0) || (uap->num > MAX_LD)) { return(EINVAL); diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c index ebe033f..a012b63 100644 --- a/sys/i386/i386/sys_machdep.c +++ b/sys/i386/i386/sys_machdep.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91 - * $Id: sys_machdep.c,v 1.16 1996/06/12 05:02:53 gpalmer Exp $ + * $Id: sys_machdep.c,v 1.17 1996/08/12 19:57:10 wollman Exp $ * */ @@ -200,7 +200,7 @@ i386_set_ldt(p, args, retval) #endif /* verify range of descriptors to modify */ - if ((uap->start < NLDT) || (uap->start >= MAX_LD) || (uap->num < 0) || + if ((uap->start < 0) || (uap->start >= MAX_LD) || (uap->num < 0) || (uap->num > MAX_LD)) { return(EINVAL); |