Message ID | 20220118223841.45870-1-jason.gerecke@wacom.com |
---|---|
State | Accepted |
Commit | 20f3cf5f860f9f267a6a6e5642d3d0525edb1814 |
Headers | show |
Series | HID: wacom: Avoid using stale array indicies to read contact count | expand |
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index 92b52b1de526..a7176fc0635d 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -2682,6 +2682,10 @@ static void wacom_wac_finger_pre_report(struct hid_device *hdev, hid_data->confidence = true; + hid_data->cc_report = 0; + hid_data->cc_index = -1; + hid_data->cc_value_index = -1; + for (i = 0; i < report->maxfield; i++) { struct hid_field *field = report->field[i]; int j;