From 823101274a30783015a228d9b44a624beb105259 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Wed, 6 Mar 2019 14:58:46 +0100 Subject: [PATCH] [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 //