diff options
author | bde <bde@FreeBSD.org> | 1997-08-03 07:26:50 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-08-03 07:26:50 +0000 |
commit | 6cd5fb9a8cc69d8c24937c48dad3ba6631ce215a (patch) | |
tree | e5fa904a1920d95f4802d453ccb4c13a7bfd27f4 /sys/kern/kern_time.c | |
parent | d73b5f1efb3abc78b05dd2b7e4d8f22cafe64291 (diff) | |
download | FreeBSD-src-6cd5fb9a8cc69d8c24937c48dad3ba6631ce215a.zip FreeBSD-src-6cd5fb9a8cc69d8c24937c48dad3ba6631ce215a.tar.gz |
Fixed syscall arg checking in clock_settime(). Stack garbage was
checked to be >= 0. This bug was introduced in rev.1.26.
Reported by: John Hay <jhay@mikom.csir.co.za>
Diffstat (limited to 'sys/kern/kern_time.c')
-rw-r--r-- | sys/kern/kern_time.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 566b0c4..2caef60 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_time.c 8.1 (Berkeley) 6/10/93 - * $Id: kern_time.c,v 1.28 1997/06/01 09:05:19 peter Exp $ + * $Id: kern_time.c,v 1.29 1997/06/24 18:20:50 jhay Exp $ */ #include <sys/param.h> @@ -168,7 +168,7 @@ clock_settime(p, uap, retval) return (EINVAL); if ((error = copyin(SCARG(uap, tp), &ats, sizeof(ats))) != 0) return (error); - if (atv.tv_usec < 0 || ats.tv_nsec >= 1000000000) + if (ats.tv_nsec < 0 || ats.tv_nsec >= 1000000000) return (EINVAL); TIMESPEC_TO_TIMEVAL(&atv, &ats); if ((error = settime(&atv))) |