projects
/
deliverable
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2b2ed2
)
Input: HID - fix potential out-of-bound array access
author
Dmitry Torokhov
<dtor@insightbb.com>
Sat, 15 Jul 2006 05:17:54 +0000
(
01:17
-0400)
committer
Dmitry Torokhov
<dtor@insightbb.com>
Sat, 15 Jul 2006 05:17:54 +0000
(
01:17
-0400)
Fixes Coverity #id 978
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/usb/input/hid-input.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/input/hid-input.c
b/drivers/usb/input/hid-input.c
index 028e1ad89f5d96471f08bbb36a96c6d3ee33e121..7208839f2dbf24d50c15516b7d99971980f8160d 100644
(file)
--- a/
drivers/usb/input/hid-input.c
+++ b/
drivers/usb/input/hid-input.c
@@
-607,7
+607,8
@@
static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
}
- if (usage->hat_min < usage->hat_max || usage->hat_dir) {
+ if (usage->type == EV_ABS &&
+ (usage->hat_min < usage->hat_max || usage->hat_dir)) {
int i;
for (i = usage->code; i < usage->code + 2 && i <= max; i++) {
input_set_abs_params(input, i, -1, 1, 0, 0);
This page took
0.025139 seconds
and
5
git commands to generate.