Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/arch/x86/x86 Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/0a056818f2fa
branches:  netbsd-8
changeset: 850991:0a056818f2fa
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Aug 31 11:34:54 2017 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #247):
        sys/arch/x86/x86/procfs_machdep.c: revision 1.16
  Check buffer length correctly to not to print a garbage character.
Fixes PR#52352 reported by Yasushi Oshima.

diffstat:

 sys/arch/x86/x86/procfs_machdep.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r e57bf9d2949d -r 0a056818f2fa sys/arch/x86/x86/procfs_machdep.c
--- a/sys/arch/x86/x86/procfs_machdep.c Thu Aug 31 11:27:50 2017 +0000
+++ b/sys/arch/x86/x86/procfs_machdep.c Thu Aug 31 11:34:54 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: procfs_machdep.c,v 1.15 2017/05/15 04:21:14 msaitoh Exp $ */
+/*     $NetBSD: procfs_machdep.c,v 1.15.2.1 2017/08/31 11:34:54 martin Exp $ */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.15 2017/05/15 04:21:14 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.15.2.1 2017/08/31 11:34:54 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -203,7 +203,7 @@
        for (CPU_INFO_FOREACH(cii, ci)) {
                procfs_getonecpu(i++, ci, bf, &used);
                total += used + 1;
-               if (used + 1 < size) {
+               if (used + 1 <= size) {
                        bf += used;
                        *bf++ = '\n';
                        size -= used + 1;



Home | Main Index | Thread Index | Old Index