Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/wscons Fix off by one (Crystal Kolipe in tech-kern@)



details:   https://anonhg.NetBSD.org/src/rev/97fd95b6d044
branches:  trunk
changeset: 372984:97fd95b6d044
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jan 09 21:53:44 2023 +0000

description:
Fix off by one (Crystal Kolipe in tech-kern@)

diffstat:

 sys/dev/wscons/wsemul_vt100_subr.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r ea4cc2773f6b -r 97fd95b6d044 sys/dev/wscons/wsemul_vt100_subr.c
--- a/sys/dev/wscons/wsemul_vt100_subr.c        Mon Jan 09 16:29:39 2023 +0000
+++ b/sys/dev/wscons/wsemul_vt100_subr.c        Mon Jan 09 21:53:44 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_vt100_subr.c,v 1.24 2018/12/06 01:42:20 uwe Exp $ */
+/* $NetBSD: wsemul_vt100_subr.c,v 1.25 2023/01/09 21:53:44 christos Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100_subr.c,v 1.24 2018/12/06 01:42:20 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100_subr.c,v 1.25 2023/01/09 21:53:44 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -195,7 +195,7 @@
        switch (A3(edp->modif1, edp->modif2, c)) {
            case A3('>', '\0', 'c'): /* DA secondary */
                wsdisplay_emulinput(edp->cbcookie, WSEMUL_VT_ID2,
-                                   sizeof(WSEMUL_VT_ID2));
+                                   sizeof(WSEMUL_VT_ID2) - 1);
                break;
 
            case A3('\0', '\0', 'J'): /* ED selective erase in display */
@@ -452,7 +452,7 @@
            case 'c': /* DA primary */
                if (ARG(edp, 0) == 0)
                        wsdisplay_emulinput(edp->cbcookie, WSEMUL_VT_ID1,
-                                           sizeof(WSEMUL_VT_ID1));
+                                           sizeof(WSEMUL_VT_ID1) - 1);
                break;
            case 'g': /* TBC */
                KASSERT(edp->tabs != 0);



Home | Main Index | Thread Index | Old Index