From 75f1637f37d8f5ae700e766aed7cc848e37e5f8f Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Wed, 4 Oct 2017 21:13:25 +0200 Subject: [PATCH] [CLASS2]: Fix status code on too small as exposed by kernel32:DeviceIoControl --- drivers/storage/class/class2/class2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/storage/class/class2/class2.c b/drivers/storage/class/class2/class2.c index 2f81022c5d7..52fdf53d5ec 100644 --- a/drivers/storage/class/class2/class2.c +++ b/drivers/storage/class/class2/class2.c @@ -4059,9 +4059,9 @@ Return Value: if (irpStack->Parameters.DeviceIoControl.OutputBufferLength < sizeof(MOUNTDEV_NAME)) { Irp->IoStatus.Information = 0; - Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL; + Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; IoCompleteRequest(Irp, IO_NO_INCREMENT); - status = STATUS_BUFFER_TOO_SMALL; + status = STATUS_INVALID_PARAMETER; goto SetStatusAndReturn; }