[PATCH] hidclass.sys: fixed size passed IOCTL_HID_GET_INPUT_REPORT (Coverity)

Marcus Meissner marcus at jet.franken.de
Sat Oct 17 07:52:29 CDT 2015


1327477 Wrong sizeof argument

Signed-off-by: Marcus Meissner <marcus at jet.franken.de>
---
 dlls/hidclass.sys/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c
index e7e7e11..dcc7d3c 100644
--- a/dlls/hidclass.sys/device.c
+++ b/dlls/hidclass.sys/device.c
@@ -277,7 +277,7 @@ static DWORD CALLBACK hid_device_thread(void *args)
             packet->reportId = 0;
 
             irp = IoBuildDeviceIoControlRequest(IOCTL_HID_GET_INPUT_REPORT,
-                device, NULL, 0, packet, sizeof(packet), TRUE, events[0],
+                device, NULL, 0, packet, sizeof(*packet)+ext->preparseData->caps.InputReportByteLength, TRUE, events[0],
                 &irp_status);
 
             irpsp = IoGetNextIrpStackLocation(irp);
-- 
2.6.0




More information about the wine-patches mailing list