From 9581f4c15a84d6b425e0689f8cdc20c6d90627d3 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 26 Oct 2016 21:52:58 +0200 Subject: [PATCH] hidclass.sys: Update reportBuffer pointer after reading packet from ringbuffer. Signed-off-by: Sebastian Lackner Signed-off-by: Aric Stewart Signed-off-by: Alexandre Julliard --- dlls/hidclass.sys/device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c index bc871b9ad19..6d9b0d47f57 100644 --- a/dlls/hidclass.sys/device.c +++ b/dlls/hidclass.sys/device.c @@ -218,6 +218,7 @@ static void HID_Device_processQueue(DEVICE_OBJECT *device) if (buffer_size) { IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation(irp); + packet->reportBuffer = (BYTE *)packet + sizeof(*packet); TRACE_(hid_report)("Processing Request (%i)\n",ptr); if (irpsp->Parameters.Read.Length >= packet->reportBufferLen) { @@ -645,6 +646,7 @@ NTSTATUS WINAPI HID_Device_read(DEVICE_OBJECT *device, IRP *irp) if (buffer_size) { IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp ); + packet->reportBuffer = (BYTE *)packet + sizeof(*packet); TRACE_(hid_report)("Got Packet %p %i\n", packet->reportBuffer, packet->reportBufferLen); if (irpsp->Parameters.Read.Length >= packet->reportBufferLen) {