- Return correct error code

svn path=/trunk/; revision=44867
This commit is contained in:
Johannes Anderwald 2010-01-02 01:22:38 +00:00
parent 3b558d84dd
commit e40621ab44

View file

@ -511,19 +511,18 @@ KsPinPropertyHandler(
break;
}
Irp->IoStatus.Information = KeyInfo->DataLength + sizeof(WCHAR);
Irp->IoStatus.Information = KeyInfo->DataLength + sizeof(WCHAR);
if (KeyInfo->DataLength + sizeof(WCHAR) > IoStack->Parameters.DeviceIoControl.OutputBufferLength)
{
Status = STATUS_MORE_ENTRIES;
Status = STATUS_BUFFER_OVERFLOW;
ExFreePool(KeyInfo);
break;
}
RtlMoveMemory(Irp->UserBuffer, &KeyInfo->Data, KeyInfo->DataLength);
((LPWSTR)Irp->UserBuffer)[KeyInfo->DataLength / sizeof(WCHAR)] = L'\0';
Irp->IoStatus.Information = KeyInfo->DataLength + sizeof(WCHAR);
ExFreePool(KeyInfo);
break;
case KSPROPERTY_PIN_PROPOSEDATAFORMAT: