mirror of
https://github.com/reactos/reactos.git
synced 2024-07-01 18:24:24 +00:00
[USBHUB_NEW][USBPORT] Fix buffer size calculation for multi-sz values in IRP_MN_QUERY_ID.
Also fix some copypasta'd DPRINTs.
This commit is contained in:
parent
a9da3c50be
commit
3baf43c5de
|
@ -1649,7 +1649,7 @@ USBH_PdoQueryId(IN PUSBHUB_PORT_PDO_EXTENSION PortExtension,
|
||||||
DeviceDescriptor->idProduct);
|
DeviceDescriptor->idProduct);
|
||||||
}
|
}
|
||||||
|
|
||||||
Length = sizeof(Buffer) - (Remaining - sizeof(UNICODE_NULL));
|
Length = sizeof(Buffer) - (Remaining - 2 * sizeof(UNICODE_NULL));
|
||||||
|
|
||||||
Id = ExAllocatePoolWithTag(PagedPool, Length, USB_HUB_TAG);
|
Id = ExAllocatePoolWithTag(PagedPool, Length, USB_HUB_TAG);
|
||||||
|
|
||||||
|
@ -1662,7 +1662,7 @@ USBH_PdoQueryId(IN PUSBHUB_PORT_PDO_EXTENSION PortExtension,
|
||||||
|
|
||||||
if (PortExtension->PortPdoFlags & USBHUB_PDO_FLAG_INIT_PORT_FAILED)
|
if (PortExtension->PortPdoFlags & USBHUB_PDO_FLAG_INIT_PORT_FAILED)
|
||||||
{
|
{
|
||||||
DPRINT("USBH_PdoQueryId: BusQueryInstanceID - %S\n", Id);
|
DPRINT("USBH_PdoQueryId: BusQueryHardwareID - %S\n", Id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1766,7 +1766,7 @@ USBH_PdoQueryId(IN PUSBHUB_PORT_PDO_EXTENSION PortExtension,
|
||||||
InterfaceDescriptor->bInterfaceClass);
|
InterfaceDescriptor->bInterfaceClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
Length = sizeof(Buffer) - (Remaining - sizeof(UNICODE_NULL));
|
Length = sizeof(Buffer) - (Remaining - 2 * sizeof(UNICODE_NULL));
|
||||||
|
|
||||||
Id = ExAllocatePoolWithTag(PagedPool, Length, USB_HUB_TAG);
|
Id = ExAllocatePoolWithTag(PagedPool, Length, USB_HUB_TAG);
|
||||||
|
|
||||||
|
@ -1779,7 +1779,7 @@ USBH_PdoQueryId(IN PUSBHUB_PORT_PDO_EXTENSION PortExtension,
|
||||||
|
|
||||||
if (PortExtension->PortPdoFlags & USBHUB_PDO_FLAG_INIT_PORT_FAILED)
|
if (PortExtension->PortPdoFlags & USBHUB_PDO_FLAG_INIT_PORT_FAILED)
|
||||||
{
|
{
|
||||||
DPRINT("USBH_PdoQueryId: BusQueryInstanceID - %S\n", Id);
|
DPRINT("USBH_PdoQueryId: BusQueryCompatibleID - %S\n", Id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1493,7 +1493,7 @@ USBPORT_GetDeviceHwIds(IN PDEVICE_OBJECT FdoDevice,
|
||||||
L"USB\\ROOT_HUB");
|
L"USB\\ROOT_HUB");
|
||||||
}
|
}
|
||||||
|
|
||||||
Length = (sizeof(Buffer) - Remaining + sizeof(UNICODE_NULL));
|
Length = (sizeof(Buffer) - Remaining + 2 * sizeof(UNICODE_NULL));
|
||||||
|
|
||||||
/* for debug only */
|
/* for debug only */
|
||||||
if (FALSE)
|
if (FALSE)
|
||||||
|
|
Loading…
Reference in a new issue