https://git.reactos.org/?p=reactos.git;a=commitdiff;h=823101274a30783015a22…
commit 823101274a30783015a228d9b44a624beb105259
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Wed Mar 6 14:58:46 2019 +0100
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Fri May 1 12:05:11 2020 +0200
[USBCCGP] Don't handle IRP_MN_QUERY_DEVICE_TEXT requests other than device
description.
---
drivers/usb/usbccgp/pdo.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/usb/usbccgp/pdo.c b/drivers/usb/usbccgp/pdo.c
index 40072ace311..1ea62bdf0e2 100644
--- a/drivers/usb/usbccgp/pdo.c
+++ b/drivers/usb/usbccgp/pdo.c
@@ -21,14 +21,32 @@ USBCCGP_PdoHandleQueryDeviceText(
IN PDEVICE_OBJECT DeviceObject,
IN OUT PIRP Irp)
{
+ PIO_STACK_LOCATION IoStack;
LPWSTR Buffer;
PPDO_DEVICE_EXTENSION PDODeviceExtension;
LPWSTR GenericString = L"Composite USB Device";
+
+ //
+ // get current irp stack location
+ //
+ IoStack = IoGetCurrentIrpStackLocation(Irp);
+
//
// get device extension
//
PDODeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
+ //
+ // check if type is description
+ //
+ if (IoStack->Parameters.QueryDeviceText.DeviceTextType != DeviceTextDescription)
+ {
+ //
+ // we only handle description
+ //
+ return Irp->IoStatus.Status;
+ }
+
//
// is there a device description
//