Commit 2de3dc3d authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

hid: Pass a buffer to DeviceIoControl in HidD_SetNumInputBuffers.

DeviceIoControl expects a pointer, and this value gets dereferenced as a ULONG* in hidclass.sys. Signed-off-by: 's avatarAndrew Eikum <aeikum@codeweavers.com> Signed-off-by: 's avatarAric Stewart <aric@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent ca112780
......@@ -102,7 +102,7 @@ BOOLEAN WINAPI HidD_SetFeature(HANDLE HidDeviceObject, PVOID ReportBuffer, ULONG
BOOLEAN WINAPI HidD_SetNumInputBuffers(HANDLE HidDeviceObject, ULONG NumberBuffers)
{
TRACE("(%p %i)\n", HidDeviceObject, NumberBuffers);
return DeviceIoControl(HidDeviceObject, IOCTL_SET_NUM_DEVICE_INPUT_BUFFERS, UlongToPtr(NumberBuffers), sizeof(NumberBuffers), NULL, 0, NULL, NULL);
return DeviceIoControl(HidDeviceObject, IOCTL_SET_NUM_DEVICE_INPUT_BUFFERS, &NumberBuffers, sizeof(NumberBuffers), NULL, 0, NULL, NULL);
}
BOOLEAN WINAPI HidD_GetProductString(HANDLE HidDeviceObject, PVOID Buffer, ULONG BufferLength)
......
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