summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjca <jca@openbsd.org>2014-05-18 21:43:11 +0000
committerjca <jca@openbsd.org>2014-05-18 21:43:11 +0000
commiteab8327524454a0b2c6d2fc12e9c96b3e8f96589 (patch)
tree39f4e6075227814b48fc5b74d077c8581d458180
parentCorrectly handle files smaller than an ELF header; reported by drahn@bitrig (diff)
downloadwireguard-openbsd-eab8327524454a0b2c6d2fc12e9c96b3e8f96589.tar.xz
wireguard-openbsd-eab8327524454a0b2c6d2fc12e9c96b3e8f96589.zip
hid_start_parse can't fail - it calls malloc(M_WAITOK). ok mpi@
-rw-r--r--sys/dev/usb/hid.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/dev/usb/hid.c b/sys/dev/usb/hid.c
index cd143245334..12c6111a22a 100644
--- a/sys/dev/usb/hid.c
+++ b/sys/dev/usb/hid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hid.c,v 1.26 2014/05/12 09:50:44 mpi Exp $ */
+/* $OpenBSD: hid.c,v 1.27 2014/05/18 21:43:11 jca Exp $ */
/* $NetBSD: hid.c,v 1.23 2002/07/11 21:14:25 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/hid.c,v 1.11 1999/11/17 22:33:39 n_hibma Exp $ */
@@ -621,8 +621,6 @@ hid_is_collection(const void *desc, int size, uint8_t id, int32_t usage)
uint32_t coll_usage = ~0;
hd = hid_start_parse(desc, size, hid_none);
- if (hd == NULL)
- return (0);
DPRINTF("%s: id=%d usage=0x%x\n", __func__, id, usage);
while (hid_get_item(hd, &hi)) {