From 4a5154e750fe5f5d764664328dd15c2deafa57b1 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 10 May 2015 01:08:50 +0200 Subject: Windows Driver: fix wrongly reported bad sectors by chkdsk caused by a bug in IOCTL_DISK_VERIFY. There was no real issue in sectors. --- src/Driver/Ntdriver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Driver/Ntdriver.c b/src/Driver/Ntdriver.c index 402301c3..2b0c0355 100644 --- a/src/Driver/Ntdriver.c +++ b/src/Driver/Ntdriver.c @@ -752,7 +752,7 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION &ullNewOffset); if (hResult != S_OK) Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; - else if (S_OK != ULongLongAdd(ullNewOffset, (ULONGLONG) pVerifyInformation->Length, &ullEndOffset)) + else if (S_OK != ULongLongAdd(ullStartingOffset, (ULONGLONG) pVerifyInformation->Length, &ullEndOffset)) Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; else if (ullEndOffset > (ULONGLONG) Extension->DiskLength) Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; -- cgit v1.2.3