Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/miscfs/kernfs Pull up revisions 1.66-1.67:



details:   https://anonhg.NetBSD.org/src/rev/03c53e2ec1b0
branches:  netbsd-1-4
changeset: 469305:03c53e2ec1b0
user:      he <he%NetBSD.org@localhost>
date:      Sat Aug 28 23:24:13 1999 +0000

description:
Pull up revisions 1.66-1.67:
  Protect {fdesc,kernfs,procfs}_readdir against directory seeks
  with bogus offsets.  (sommerfeld)

diffstat:

 sys/miscfs/kernfs/kernfs_vnops.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 38544cbdc78c -r 03c53e2ec1b0 sys/miscfs/kernfs/kernfs_vnops.c
--- a/sys/miscfs/kernfs/kernfs_vnops.c  Sat Aug 28 23:22:21 1999 +0000
+++ b/sys/miscfs/kernfs/kernfs_vnops.c  Sat Aug 28 23:24:13 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kernfs_vnops.c,v 1.63 1999/03/24 05:51:26 mrg Exp $    */
+/*     $NetBSD: kernfs_vnops.c,v 1.63.2.1 1999/08/28 23:24:13 he Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -598,7 +598,7 @@
        struct uio *uio = ap->a_uio;
        struct dirent d;
        struct kern_target *kt;
-       int i;
+       off_t i;
        int error;
        off_t *cookies = NULL;
        int ncookies = 0, nc = 0;
@@ -613,6 +613,10 @@
 
        error = 0;
        i = uio->uio_offset;
+
+       if (i >= nkern_targets)
+               return 0;
+         
        memset((caddr_t)&d, 0, UIO_MX);
        d.d_reclen = UIO_MX;
 



Home | Main Index | Thread Index | Old Index