Commit 98c512e0 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

hidclass.sys: Pass sizeof(packet) as input for IOCTL_HID_SET_OUTPUT_REPORT.

parent ada3ec64
......@@ -356,7 +356,16 @@ static void hid_device_xfer_report( BASE_DEVICE_EXTENSION *ext, ULONG code, IRP
packet.reportBufferLen--;
}
call_minidriver( code, ext->u.pdo.parent_fdo, NULL, 0, &packet, sizeof(packet), &irp->IoStatus );
switch (code)
{
case IOCTL_HID_GET_FEATURE:
case IOCTL_HID_GET_INPUT_REPORT:
call_minidriver( code, ext->u.pdo.parent_fdo, NULL, 0, &packet, sizeof(packet), &irp->IoStatus );
break;
case IOCTL_HID_SET_OUTPUT_REPORT:
call_minidriver( code, ext->u.pdo.parent_fdo, NULL, sizeof(packet), &packet, 0, &irp->IoStatus );
break;
}
}
static void HID_set_to_device( DEVICE_OBJECT *device, IRP *irp )
......
......@@ -549,8 +549,8 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp)
{
HID_XFER_PACKET *packet = irp->UserBuffer;
ULONG expected_size = 2;
todo_wine ok(in_size == sizeof(*packet), "got input size %u\n", in_size);
todo_wine ok(!out_size, "got output size %u\n", out_size);
ok(in_size == sizeof(*packet), "got input size %u\n", in_size);
ok(!out_size, "got output size %u\n", out_size);
todo_wine_if(packet->reportId == 0x5a)
ok(packet->reportId == report_id, "got id %u\n", packet->reportId);
......
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