diff options
author | 2018-01-08 08:14:00 +0000 | |
---|---|---|
committer | 2018-01-08 08:14:00 +0000 | |
commit | 9476f01c716498b9e98595483b8f5430e9891b38 (patch) | |
tree | 0aca1fecf0eaa36496f0cfc0ce11b6e087a18652 /sys/dev/i2c/ihidev.c | |
parent | Mark up command strings with Cm, and variables with Va. (diff) | |
download | wireguard-openbsd-9476f01c716498b9e98595483b8f5430e9891b38.tar.xz wireguard-openbsd-9476f01c716498b9e98595483b8f5430e9891b38.zip |
Attach dwiic_pci on Dell Precision 7520. Also restrict ihidev reports
to those of 3 bytes or more (as per the hid-over-i2c spec).
discussed with jcs, kettenis
Diffstat (limited to 'sys/dev/i2c/ihidev.c')
-rw-r--r-- | sys/dev/i2c/ihidev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/i2c/ihidev.c b/sys/dev/i2c/ihidev.c index b0a80e93278..148c1458714 100644 --- a/sys/dev/i2c/ihidev.c +++ b/sys/dev/i2c/ihidev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ihidev.c,v 1.14 2017/11/29 02:48:16 jcs Exp $ */ +/* $OpenBSD: ihidev.c,v 1.15 2018/01/08 08:14:00 mlarkin Exp $ */ /* * HID-over-i2c driver * @@ -604,7 +604,7 @@ ihidev_intr(void *arg) * than or equal to wMaxInputLength */ psize = sc->sc_ibuf[0] | sc->sc_ibuf[1] << 8; - if (!psize || psize > sc->sc_isize) { + if (psize < 3 || psize > sc->sc_isize) { if (sc->sc_poll) { /* * TODO: all fingers are up, should we pass to hid |