Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/dev/sun Pull up revision 1.30 (requested by pk):



details:   https://anonhg.NetBSD.org/src/rev/940a23ab404c
branches:  netbsd-1-5
changeset: 493111:940a23ab404c
user:      he <he%NetBSD.org@localhost>
date:      Thu Jun 06 17:08:33 2002 +0000

description:
Pull up revision 1.30 (requested by pk):
  Avoid a NULL pointer dereference if a workstation keyboard is
  connected but not configured as the console input device.

diffstat:

 sys/dev/sun/kbd.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r c4daba6db9f3 -r 940a23ab404c sys/dev/sun/kbd.c
--- a/sys/dev/sun/kbd.c Thu Jun 06 17:04:48 2002 +0000
+++ b/sys/dev/sun/kbd.c Thu Jun 06 17:08:33 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kbd.c,v 1.26 2000/03/24 11:46:47 hannken Exp $ */
+/*     $NetBSD: kbd.c,v 1.26.4.1 2002/06/06 17:08:33 he Exp $  */
 
 /*
  * Copyright (c) 1992, 1993
@@ -596,6 +596,10 @@
        struct kbd_state *ks = &k->k_state;
        int data;
 
+       /* Check if a recipient has been configured */
+       if (k->k_cc == NULL)
+               return (0);
+
        switch (KEYSYM_CLASS(keysym)) {
 
        case KEYSYM_ASCII:



Home | Main Index | Thread Index | Old Index