diff options
author | Anton Lindqvist <anton@cvs.openbsd.org> | 2021-08-25 05:47:16 +0000 |
---|---|---|
committer | Anton Lindqvist <anton@cvs.openbsd.org> | 2021-08-25 05:47:16 +0000 |
commit | 92e119db21ed071ffed064734eee2c47378e096a (patch) | |
tree | 48587a9364bcc733ed6e0a7f7c07264fa6fbbe61 /sys | |
parent | e4d6b6591d7758b6e4e65ed17394b82b5bb2c6a5 (diff) |
Prevent ucc(4) from matching report IDs with an empty input report.
Fixes cwen@'s Creative BT-W3 audio device.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/ucc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/usb/ucc.c b/sys/dev/usb/ucc.c index 0e1986b83d3..cdd5d0f3c07 100644 --- a/sys/dev/usb/ucc.c +++ b/sys/dev/usb/ucc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ucc.c,v 1.8 2021/08/25 05:46:31 anton Exp $ */ +/* $OpenBSD: ucc.c,v 1.9 2021/08/25 05:47:15 anton Exp $ */ /* * Copyright (c) 2021 Anton Lindqvist <anton@openbsd.org> @@ -141,6 +141,8 @@ ucc_match(struct device *parent, void *match, void *aux) if (!hid_is_collection(desc, size, uha->reportid, HID_USAGE2(HUP_CONSUMER, HUC_CONTROL))) return UMATCH_NONE; + if (hid_report_size(desc, size, hid_input, uha->reportid) == 0) + return UMATCH_NONE; return UMATCH_IFACECLASS; } |