Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/dev/wscons Apply patch (requested by drochner in ti...



details:   https://anonhg.NetBSD.org/src/rev/259daeca2b57
branches:  netbsd-1-6
changeset: 530307:259daeca2b57
user:      grant <grant%NetBSD.org@localhost>
date:      Mon Jun 16 14:09:14 2003 +0000

description:
Apply patch (requested by drochner in ticket #1277):

fix crash due to wrong argument in the (almost useless)
DECRQUPSS escape sequence

PR/17738: Matthias Drochner, PR/21230: Onno van der Linden: vt100 wscons
crashes restoring cursor. Fixed by adding a flag as suggested.

diffstat:

 sys/dev/wscons/wsemul_vt100.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 2cf9afd175a5 -r 259daeca2b57 sys/dev/wscons/wsemul_vt100.c
--- a/sys/dev/wscons/wsemul_vt100.c     Mon Jun 16 14:04:07 2003 +0000
+++ b/sys/dev/wscons/wsemul_vt100.c     Mon Jun 16 14:09:14 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_vt100.c,v 1.17 2002/01/12 16:41:02 tsutsui Exp $ */
+/* $NetBSD: wsemul_vt100.c,v 1.17.10.1 2003/06/16 14:09:14 grant Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100.c,v 1.17 2002/01/12 16:41:02 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100.c,v 1.17.10.1 2003/06/16 14:09:14 grant Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -442,6 +442,7 @@
                newstate = VT100_EMUL_STATE_CSI;
                break;
            case '7': /* DECSC */
+               edp->flags |= VTFL_SAVEDCURS;
                edp->savedcursor_row = edp->crow;
                edp->savedcursor_col = edp->ccol;
                edp->savedattr = edp->curattr;
@@ -455,6 +456,8 @@
                edp->savedchartab1 = edp->chartab1;
                break;
            case '8': /* DECRC */
+               if ((edp->flags & VTFL_SAVEDCURS) == 0)
+                       break;
                edp->crow = edp->savedcursor_row;
                edp->ccol = edp->savedcursor_col;
                edp->curattr = edp->savedattr;



Home | Main Index | Thread Index | Old Index