[Spice-devel] [PATCH spice-gtk v2 19/33] fixup! usb-redir: add files for SCSI and USB MSC implementation
Frediano Ziglio
fziglio at redhat.com
Fri Aug 9 14:26:37 UTC 2019
Remove potential integer overflow.
count can be specified with all bits.
---
src/cd-scsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cd-scsi.c b/src/cd-scsi.c
index 1cb268bf..d039e3c4 100644
--- a/src/cd-scsi.c
+++ b/src/cd-scsi.c
@@ -2545,7 +2545,7 @@ static void cd_scsi_cmd_read(CdScsiLU *dev, CdScsiRequest *req)
req->offset = req->lba * dev->block_size;
req->count = scsi_cdb_xfer_length(req->cdb, req->cdb_len); /* xfer in blocks */
- req->req_len = req->count * dev->block_size;
+ req->req_len = (uint64_t) req->count * dev->block_size;
cd_scsi_read_async_start(dev, req);
}
--
2.20.1
More information about the Spice-devel
mailing list