Commit 9411ecf6 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

hidclass.sys: Drop reports when length doesn't match their declaration.

Based on a patch from Ivo Ivanov <logos128@gmail.com>. Instead of using the descriptor input report length, which is the maximum length of all input reports. Tests show that the reports should be dropped, in non-polled mode, when their length is invalid, but we were dropping too many of them. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51828Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 3c743180
......@@ -349,7 +349,8 @@ static DWORD CALLBACK hid_device_thread(void *args)
packet->reportBuffer = buffer;
packet->reportBufferLen = io.Information;
if (polled || io.Information == desc->InputLength)
report = find_report_with_type_and_id( ext, HidP_Input, buffer[0], FALSE );
if (polled || (report && report->InputLength == io.Information))
hid_device_queue_input( device, packet );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment