Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/fs/ptyfs Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/6863297233a4
branches:  netbsd-9
changeset: 369725:6863297233a4
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Aug 29 15:45:10 2022 +0000

description:
Pull up following revision(s) (requested by riastradh in ticket #1504):

        sys/fs/ptyfs/ptyfs_vnops.c: revision 1.69

ptyfs: Don't copy out cookies past end of buffer.

diffstat:

 sys/fs/ptyfs/ptyfs_vnops.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 1b9b3efa4408 -r 6863297233a4 sys/fs/ptyfs/ptyfs_vnops.c
--- a/sys/fs/ptyfs/ptyfs_vnops.c        Mon Aug 29 15:39:39 2022 +0000
+++ b/sys/fs/ptyfs/ptyfs_vnops.c        Mon Aug 29 15:45:10 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ptyfs_vnops.c,v 1.55 2018/09/03 16:29:35 riastradh Exp $       */
+/*     $NetBSD: ptyfs_vnops.c,v 1.55.4.1 2022/08/29 15:45:10 martin Exp $      */
 
 /*
  * Copyright (c) 1993, 1995
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.55 2018/09/03 16:29:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.55.4.1 2022/08/29 15:45:10 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -716,7 +716,7 @@
                *ap->a_cookies = cookies;
        }
 
-       for (; i < 2; i++) {
+       for (; i < 2 && uio->uio_resid >= UIO_MX; i++) {
                /* `.' and/or `..' */
                dp->d_fileno = PTYFS_FILENO(0, PTYFSroot);
                dp->d_namlen = i + 1;



Home | Main Index | Thread Index | Old Index