- Handle retrieving string descriptors failure

svn path=/trunk/; revision=55964
This commit is contained in:
Johannes Anderwald 2012-03-03 11:38:37 +00:00
parent 6a0de53856
commit ccdeb596e1
2 changed files with 4 additions and 4 deletions

View file

@ -997,7 +997,7 @@ CreateDeviceIds(
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 @@ CreateDeviceIds(
DPRINT("usDeviceId %wZ\n", &UsbChildExtension->usInstanceId);
}
return Status;
return STATUS_SUCCESS;
}
NTSTATUS

View file

@ -533,8 +533,8 @@ USBHUB_PdoQueryDeviceText(
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;
}