Author: janderwald
Date: Sat Mar 3 11:38:37 2012
New Revision: 55964
URL:
http://svn.reactos.org/svn/reactos?rev=55964&view=rev
Log:
[USBHUB]
- Handle retrieving string descriptors failure
Modified:
trunk/reactos/drivers/usb/usbhub/fdo.c
trunk/reactos/drivers/usb/usbhub/pdo.c
Modified: trunk/reactos/drivers/usb/usbhub/fdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbhub/fdo.c?r…
==============================================================================
--- trunk/reactos/drivers/usb/usbhub/fdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbhub/fdo.c [iso-8859-1] Sat Mar 3 11:38:37 2012
@@ -997,7 +997,7 @@
if (!NT_SUCCESS(Status))
{
DPRINT1("USBHUB: GetUsbStringDescriptor failed with status %x\n",
Status);
- RtlInitUnicodeString(&UsbChildExtension->usTextDescription,
L"");
+ RtlInitUnicodeString(&UsbChildExtension->usTextDescription, L"USB
Device"); // FIXME NON-NLS
}
else
{
@@ -1048,7 +1048,7 @@
DPRINT("usDeviceId %wZ\n", &UsbChildExtension->usInstanceId);
}
- return Status;
+ return STATUS_SUCCESS;
}
NTSTATUS
Modified: trunk/reactos/drivers/usb/usbhub/pdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbhub/pdo.c?r…
==============================================================================
--- trunk/reactos/drivers/usb/usbhub/pdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbhub/pdo.c [iso-8859-1] Sat Mar 3 11:38:37 2012
@@ -533,8 +533,8 @@
if (SourceString)
{
- ReturnString = ExAllocatePool(PagedPool, SourceString->Length);
- RtlCopyMemory(ReturnString, SourceString->Buffer, SourceString->Length);
+ ReturnString = ExAllocatePool(PagedPool, SourceString->MaximumLength);
+ RtlCopyMemory(ReturnString, SourceString->Buffer,
SourceString->MaximumLength);
DPRINT1("%S\n", ReturnString);
*Information = (ULONG_PTR)ReturnString;
}