https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c1de553eba883af9e1202…
commit c1de553eba883af9e120272a36bacb79397f85ee
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sun Sep 12 14:33:15 2021 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sun Sep 12 14:33:15 2021 +0200
KBDHID: IOCTL_KEYBOARD_QUERY_* calls must return STATUS_BUFFER_TOO_SMALL if the output
buffer is too small
---
drivers/hid/kbdhid/kbdhid.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/hid/kbdhid/kbdhid.c b/drivers/hid/kbdhid/kbdhid.c
index bacf72a0109..b07a7d8445c 100644
--- a/drivers/hid/kbdhid/kbdhid.c
+++ b/drivers/hid/kbdhid/kbdhid.c
@@ -444,8 +444,8 @@ KbdHid_InternalDeviceControl(
case IOCTL_KEYBOARD_QUERY_INDICATORS:
if (IoStack->Parameters.DeviceIoControl.OutputBufferLength <
sizeof(KEYBOARD_INDICATOR_PARAMETERS))
{
- /* invalid parameter */
- Irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
+ /* buffer too small */
+ Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_INVALID_PARAMETER;
}
@@ -464,8 +464,8 @@ KbdHid_InternalDeviceControl(
case IOCTL_KEYBOARD_QUERY_TYPEMATIC:
if (IoStack->Parameters.DeviceIoControl.OutputBufferLength <
sizeof(KEYBOARD_TYPEMATIC_PARAMETERS))
{
- /* invalid parameter */
- Irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
+ /* buffer too small */
+ Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_INVALID_PARAMETER;
}