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/procfs Pull up revisions 1.66-1.68:



details:   https://anonhg.NetBSD.org/src/rev/db9fbaac7634
branches:  netbsd-1-4
changeset: 469306:db9fbaac7634
user:      he <he%NetBSD.org@localhost>
date:      Sat Aug 28 23:28:16 1999 +0000

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

diffstat:

 sys/miscfs/procfs/procfs_vnops.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 03c53e2ec1b0 -r db9fbaac7634 sys/miscfs/procfs/procfs_vnops.c
--- a/sys/miscfs/procfs/procfs_vnops.c  Sat Aug 28 23:24:13 1999 +0000
+++ b/sys/miscfs/procfs/procfs_vnops.c  Sat Aug 28 23:28:16 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: procfs_vnops.c,v 1.61 1999/03/12 18:45:40 christos Exp $       */
+/*     $NetBSD: procfs_vnops.c,v 1.61.2.1 1999/08/28 23:28:16 he Exp $ */
 
 /*
  * Copyright (c) 1993 Jan-Simon Pendry
@@ -797,7 +797,7 @@
        struct uio *uio = ap->a_uio;
        struct dirent d;
        struct pfsnode *pfs;
-       int i;
+       off_t i;
        int error;
        off_t *cookies = NULL;
        int ncookies;
@@ -825,6 +825,9 @@
                struct proc *p;
                struct proc_target *pt;
 
+               if (i >= nproc_targets)
+                       return 0;
+
                p = PFIND(pfs->pfs_pid);
                if (p == NULL)
                        break;



Home | Main Index | Thread Index | Old Index