diff options
| author | jakllsch <jakllsch@NetBSD.org> | 2018-11-15 23:01:45 +0000 |
|---|---|---|
| committer | jakllsch <jakllsch@NetBSD.org> | 2018-11-15 23:01:45 +0000 |
| commit | c3da122833dc6045f2ef0961767301892e8582c4 (patch) | |
| tree | f5a1eb8d3a4898c9dfb1a91099af9e6b78f3da80 /sys/dev/bluetooth | |
| parent | f71d64d3b549a9e1d09e93c4ea05845bb2fc97c5 (diff) | |
Correctly handle signed/unsigned quantities in kernel HID parser.
Should fix PR kern/53605.
Diffstat (limited to 'sys/dev/bluetooth')
| -rw-r--r-- | sys/dev/bluetooth/bthidev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/bluetooth/bthidev.c b/sys/dev/bluetooth/bthidev.c index 8c01e1e8a75..41eca20c3ed 100644 --- a/sys/dev/bluetooth/bthidev.c +++ b/sys/dev/bluetooth/bthidev.c @@ -1,4 +1,4 @@ -/* $NetBSD: bthidev.c,v 1.30 2017/12/10 17:03:07 bouyer Exp $ */ +/* $NetBSD: bthidev.c,v 1.31 2018/11/15 23:01:45 jakllsch Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bthidev.c,v 1.30 2017/12/10 17:03:07 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bthidev.c,v 1.31 2018/11/15 23:01:45 jakllsch Exp $"); #include <sys/param.h> #include <sys/condvar.h> @@ -284,7 +284,7 @@ bthidev_attach(device_t parent, device_t self, void *aux) h.report_ID = 0; d = hid_start_parse(desc, dlen, hid_none); while (hid_get_item(d, &h)) { - if (h.report_ID > maxid) + if ((int)h.report_ID > maxid) maxid = h.report_ID; } hid_end_parse(d); |
