CVSROOT:        /cvs
Module name:    src
Changes by:     m...@cvs.openbsd.org    2010/08/01 15:37:08

Modified files:
        sys/dev/usb    : hidkbd.c 

Log message:
Be more generous when parsing the report descriptor:
- parts of the report descriptor not in a format we expect are now ignored,
instead of preventing attachment (e.g. hypothetical multi-bit modifiers).
- modifiers beyond MAXMOD are ignored.
- keycode arrays larger than MAXKEYCODE are clamped to MAXKEYCODE instead
of being rejected.
- multiple keycode arrays are ignored.

This should allow rogue keyboards to attach and be usable up to a certain
extent.

Adapted from a diff sent by Loganaden Velvindron (first name at gmail), who
has a keyboard which keycode array is larger than MAXKEYCODE (but, like most
if not all USB keyboards out there, can only report up to three simultaneous
keypresses anyway).

Reply via email to