Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/kern pullup 1.36->1.37 (thorpej): Make sure "olddel...



details:   https://anonhg.NetBSD.org/src/rev/0b381dc7a1de
branches:  netbsd-1-4
changeset: 468719:0b381dc7a1de
user:      perry <perry%NetBSD.org@localhost>
date:      Fri Jun 18 17:12:28 1999 +0000

description:
pullup 1.36->1.37 (thorpej): Make sure "olddelta" is a valid pointer

diffstat:

 sys/kern/kern_time.c |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (30 lines):

diff -r d81308765c8a -r 0b381dc7a1de sys/kern/kern_time.c
--- a/sys/kern/kern_time.c      Fri Jun 18 17:07:27 1999 +0000
+++ b/sys/kern/kern_time.c      Fri Jun 18 17:12:28 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_time.c,v 1.36 1998/08/18 06:27:01 thorpej Exp $   */
+/*     $NetBSD: kern_time.c,v 1.36.6.1 1999/06/18 17:12:28 perry Exp $ */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -50,6 +50,9 @@
 #include <sys/mount.h>
 #include <sys/syscallargs.h>
 
+#include <vm/vm.h>
+#include <uvm/uvm_extern.h>
+
 #if defined(NFS) || defined(NFSSERVER)
 #include <nfs/rpcv2.h>
 #include <nfs/nfsproto.h>
@@ -344,6 +347,10 @@
        error = copyin(SCARG(uap, delta), &atv, sizeof(struct timeval));
        if (error)
                return (error);
+       if (SCARG(uap, olddelta) != NULL &&
+           uvm_useracc((caddr_t)SCARG(uap, olddelta), sizeof(struct timeval),
+            B_WRITE) == FALSE)
+               return (EFAULT);
 
        /*
         * Compute the total correction and the rate at which to apply it.



Home | Main Index | Thread Index | Old Index