mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 02:59:48 +00:00
hidclass.sys: Return STATUS_INVALID_USER_BUFFER when appropriate.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6f4ccd04cd
commit
9c5ab964e9
|
@ -499,7 +499,12 @@ NTSTATUS WINAPI pdo_ioctl(DEVICE_OBJECT *device, IRP *irp)
|
|||
BYTE *buffer = MmGetSystemAddressForMdlSafe(irp->MdlAddress, NormalPagePriority);
|
||||
ULONG out_length;
|
||||
|
||||
if (!irpsp->Parameters.DeviceIoControl.OutputBufferLength || !buffer)
|
||||
if (!buffer)
|
||||
{
|
||||
irp->IoStatus.Status = STATUS_INVALID_USER_BUFFER;
|
||||
break;
|
||||
}
|
||||
if (!irpsp->Parameters.DeviceIoControl.OutputBufferLength)
|
||||
{
|
||||
irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL;
|
||||
break;
|
||||
|
|
|
@ -2441,7 +2441,7 @@ static void test_hidp(HANDLE file, HANDLE async_file, int report_id, BOOL polled
|
|||
SetLastError(0xdeadbeef);
|
||||
ret = HidD_GetInputReport(file, report, 0);
|
||||
ok(!ret, "HidD_GetInputReport succeeded\n");
|
||||
todo_wine ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "HidD_GetInputReport returned error %u\n", GetLastError());
|
||||
ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "HidD_GetInputReport returned error %u\n", GetLastError());
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = HidD_GetInputReport(file, report, caps.InputReportByteLength - 1);
|
||||
|
|
Loading…
Reference in a new issue