diff --git a/drivers/filesystems/npfs/fileinfo.c b/drivers/filesystems/npfs/fileinfo.c index dd87ac75d55..56789a22a3e 100644 --- a/drivers/filesystems/npfs/fileinfo.c +++ b/drivers/filesystems/npfs/fileinfo.c @@ -433,7 +433,7 @@ NpCommonQueryInformation(IN PDEVICE_OBJECT DeviceObject, case FileAllInformation: - Length -= 12; + Length -= sizeof(FILE_ACCESS_INFORMATION) + sizeof(FILE_MODE_INFORMATION) + sizeof(FILE_ALIGNMENT_INFORMATION); AllInfo = (PFILE_ALL_INFORMATION)Buffer; NpQueryBasicInfo(Ccb, &AllInfo->BasicInformation, &Length); NpQueryStandardInfo(Ccb, &AllInfo->StandardInformation, &Length, NamedPipeEnd); @@ -441,7 +441,6 @@ NpCommonQueryInformation(IN PDEVICE_OBJECT DeviceObject, NpQueryEaInfo(Ccb, &AllInfo->EaInformation, &Length); NpQueryPositionInfo(Ccb, &AllInfo->PositionInformation, &Length, NamedPipeEnd); Status = NpQueryNameInfo(Ccb, &AllInfo->NameInformation, &Length); - Length += 96; break; case FileEaInformation: @@ -453,7 +452,7 @@ NpCommonQueryInformation(IN PDEVICE_OBJECT DeviceObject, break; } - Irp->IoStatus.Information = IoStack->Parameters.Read.Length - Length; + Irp->IoStatus.Information = IoStack->Parameters.QueryFile.Length - Length; return Status; } diff --git a/drivers/filesystems/npfs/fsctrl.c b/drivers/filesystems/npfs/fsctrl.c index d9ff6c846ee..0c93c8ad1cf 100644 --- a/drivers/filesystems/npfs/fsctrl.c +++ b/drivers/filesystems/npfs/fsctrl.c @@ -604,7 +604,7 @@ NpTransceive(IN PDEVICE_OBJECT DeviceObject, NewIrp->Tail.Overlay.Thread = Irp->Tail.Overlay.Thread; NewIrp->IoStatus.Information = BytesWritten; - IoStack->Parameters.Read.Length = BytesWritten; + IoStack->Parameters.Write.Length = BytesWritten; IoStack->MajorFunction = IRP_MJ_WRITE; if (BytesWritten > 0) NewIrp->Flags = IRP_DEALLOCATE_BUFFER | IRP_BUFFERED_IO;