diff options
| author | Abenezer Tamene <[email protected]> | 2025-06-23 02:13:13 -0700 |
|---|---|---|
| committer | Abenezer Tamene <[email protected]> | 2025-06-23 02:13:13 -0700 |
| commit | f79d24e9a46698f0666130bd41edb133f220a2da (patch) | |
| tree | 685ec3ca62318c14f48c3c51ba1120a1d862b9c8 | |
| parent | a4440c5da6d6bcd99b0ac576651117e2daffa50f (diff) | |
other classpnp and disk fixes
| -rw-r--r-- | storage/class/classpnp/src/class.c | 6 | ||||
| -rw-r--r-- | storage/class/classpnp/src/obsolete.c | 6 | ||||
| -rw-r--r-- | storage/class/disk/src/diskwmi.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/storage/class/classpnp/src/class.c b/storage/class/classpnp/src/class.c index 58d1835a..6da2b146 100644 --- a/storage/class/classpnp/src/class.c +++ b/storage/class/classpnp/src/class.c @@ -3740,7 +3740,7 @@ ClassIoComplete( PSCSI_REQUEST_BLOCK srb = Context; PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = Fdo->DeviceExtension; PCLASS_PRIVATE_FDO_DATA fdoData = fdoExtension->PrivateFdoData; - NTSTATUS status; + NTSTATUS status = STATUS_SUCCESS; BOOLEAN retry; BOOLEAN callStartNextPacket; ULONG srbFlags; @@ -6055,7 +6055,7 @@ __ClassInterpretSenseInfo_ProcessingInvalidSenseBuffer: logErrorInternal = FALSE; logError = FALSE; } else if (cdbOpcode == SCSIOP_MODE_SENSE10) { - USHORT allocationLength; + USHORT allocationLength = 0; REVERSE_BYTES_SHORT(&(cdb->MODE_SENSE10.AllocationLength), &allocationLength); if (SrbGetDataTransferLength(Srb) <= allocationLength) { *Status = STATUS_SUCCESS; @@ -6063,7 +6063,7 @@ __ClassInterpretSenseInfo_ProcessingInvalidSenseBuffer: logError = FALSE; } } else if (ClasspIsReceiveTokenInformation(cdb)) { - ULONG allocationLength; + ULONG allocationLength = 0; REVERSE_BYTES(&(cdb->RECEIVE_TOKEN_INFORMATION.AllocationLength), &allocationLength); if (SrbGetDataTransferLength(Srb) <= allocationLength) { *Status = STATUS_SUCCESS; diff --git a/storage/class/classpnp/src/obsolete.c b/storage/class/classpnp/src/obsolete.c index aeeef81d..e0fe3d13 100644 --- a/storage/class/classpnp/src/obsolete.c +++ b/storage/class/classpnp/src/obsolete.c @@ -119,7 +119,7 @@ ClassIoCompleteAssociated( PIRP originalIrp = Irp->AssociatedIrp.MasterIrp; LONG irpCount; - NTSTATUS status; + NTSTATUS status = STATUS_SUCCESS; BOOLEAN retry; TracePrint((TRACE_LEVEL_WARNING, TRACE_FLAG_GENERAL, "ClassIoCompleteAssociated is OBSOLETE !")); @@ -390,8 +390,8 @@ RetryRequest( // NT_ASSERT(SrbGetDataBuffer(srbHeader) == MmGetMdlVirtualAddress(Irp->MdlAddress)); - _Analysis_assume_(Irp->MdlAddress->ByteCount <= dataTransferLength); - transferByteCount = Irp->MdlAddress->ByteCount; + _Analysis_assume_(MmGetMdlByteCount(Irp->MdlAddress) <= dataTransferLength); + transferByteCount = MmGetMdlByteCount(Irp->MdlAddress); } else { diff --git a/storage/class/disk/src/diskwmi.c b/storage/class/disk/src/diskwmi.c index 7503e5a1..de2d7eee 100644 --- a/storage/class/disk/src/diskwmi.c +++ b/storage/class/disk/src/diskwmi.c @@ -1739,7 +1739,7 @@ DiskInfoExceptionComplete( // // Reset byte count of transfer in SRB Extension. // - srbEx->DataTransferLength = Irp->MdlAddress->ByteCount; + srbEx->DataTransferLength = MmGetMdlByteCount(Irp->MdlAddress); // // Zero SRB statuses. @@ -1768,7 +1768,7 @@ DiskInfoExceptionComplete( // // Reset byte count of transfer in SRB Extension. // - srb->DataTransferLength = Irp->MdlAddress->ByteCount; + srb->DataTransferLength = MmGetMdlByteCount(Irp->MdlAddress); // // Zero SRB statuses. |
