Skip to content

Commit

Permalink
[viostor] fix incorrect IO boundary handling in RhelScsiVerify
Browse files Browse the repository at this point in the history
Signed-off-by: Zhang JianMing [email protected]

for the problem description
please visit virtio-win#1095
  • Loading branch information
zjmletang authored and Martin Drab committed Aug 18, 2024
1 parent 2b6de88 commit 59e63ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion viostor/virtio_stor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1811,7 +1811,7 @@ RhelScsiVerify(

lba = RhelGetLba(DeviceExtension, cdb);
blocks = RhelGetSectors(DeviceExtension, cdb);
if ((lba + blocks) >= adaptExt->lastLBA) {
if ((lba + blocks) > adaptExt->lastLBA) {
RhelDbgPrint(TRACE_LEVEL_ERROR, " lba = %llu lastLBA= %llu blocks = %lu\n", lba, adaptExt->lastLBA, blocks);
SrbStatus = SRB_STATUS_INVALID_REQUEST;
}
Expand Down

0 comments on commit 59e63ed

Please sign in to comment.