Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Cap h.loc.count at MAXKEYCODE instead of bailing...
details: https://anonhg.NetBSD.org/src/rev/b3cf5d3fe603
branches: trunk
changeset: 760312:b3cf5d3fe603
user: mbalmer <mbalmer%NetBSD.org@localhost>
date: Sun Jan 02 12:36:41 2011 +0000
description:
Cap h.loc.count at MAXKEYCODE instead of bailing out. This lets some obscure/
roque keyboards attach.
>From loganaden%devio.us@localhost (Loganaden Velvindron), thanks!
diffstat:
sys/dev/usb/ukbd.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r c48bc34575a2 -r b3cf5d3fe603 sys/dev/usb/ukbd.c
--- a/sys/dev/usb/ukbd.c Sun Jan 02 12:25:30 2011 +0000
+++ b/sys/dev/usb/ukbd.c Sun Jan 02 12:36:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ukbd.c,v 1.109 2010/11/30 11:35:30 phx Exp $ */
+/* $NetBSD: ukbd.c,v 1.110 2011/01/02 12:36:41 mbalmer Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.109 2010/11/30 11:35:30 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.110 2011/01/02 12:36:41 mbalmer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -996,7 +996,7 @@
if (h.loc.size != 8)
return ("key code size != 8");
if (h.loc.count > MAXKEYCODE)
- return ("too many key codes");
+ h.loc.count = MAXKEYCODE;
if (h.loc.pos % 8 != 0)
return ("key codes not on byte boundary");
if (sc->sc_nkeycode != 0)
Home |
Main Index |
Thread Index |
Old Index