mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[KBDHID] IOCTL_KEYBOARD_QUERY_ATTRIBUTES: Return proper KEYBOARD_ATTRIBUTES buffer size
This commit is contained in:
parent
984c7da24d
commit
b6249d5ede
1 changed files with 2 additions and 2 deletions
|
@ -381,7 +381,7 @@ KbdHid_InternalDeviceControl(
|
||||||
{
|
{
|
||||||
case IOCTL_KEYBOARD_QUERY_ATTRIBUTES:
|
case IOCTL_KEYBOARD_QUERY_ATTRIBUTES:
|
||||||
/* verify output buffer length */
|
/* verify output buffer length */
|
||||||
if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < sizeof(MOUSE_ATTRIBUTES))
|
if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < sizeof(KEYBOARD_ATTRIBUTES))
|
||||||
{
|
{
|
||||||
/* invalid request */
|
/* invalid request */
|
||||||
DPRINT1("[KBDHID] IOCTL_KEYBOARD_QUERY_ATTRIBUTES Buffer too small\n");
|
DPRINT1("[KBDHID] IOCTL_KEYBOARD_QUERY_ATTRIBUTES Buffer too small\n");
|
||||||
|
@ -399,7 +399,7 @@ KbdHid_InternalDeviceControl(
|
||||||
sizeof(KEYBOARD_ATTRIBUTES));
|
sizeof(KEYBOARD_ATTRIBUTES));
|
||||||
|
|
||||||
/* complete request */
|
/* complete request */
|
||||||
Irp->IoStatus.Information = sizeof(MOUSE_ATTRIBUTES);
|
Irp->IoStatus.Information = sizeof(KEYBOARD_ATTRIBUTES);
|
||||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
|
|
Loading…
Reference in a new issue