Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151357000
D55795.id173504.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
716 B
Referenced Files
None
Subscribers
None
D55795.id173504.diff
View Options
diff --git a/usr.sbin/bhyve/pci_virtio_scsi.c b/usr.sbin/bhyve/pci_virtio_scsi.c
--- a/usr.sbin/bhyve/pci_virtio_scsi.c
+++ b/usr.sbin/bhyve/pci_virtio_scsi.c
@@ -747,8 +747,11 @@
* This will have to change if we begin allowing config space writes
* to change sense size.
*/
- assert(iov_to_buf(req->vsr_iov_in, req->vsr_niov_in,
- (void **)&req->vsr_cmd_rd) == VTSCSI_IN_HEADER_LEN(q->vsq_sc));
+ {
+ ssize_t bufsize = iov_to_buf(req->vsr_iov_in, req->vsr_niov_in,
+ (void **)&req->vsr_cmd_rd);
+ assert(bufsize >= 0 && (size_t)bufsize == VTSCSI_IN_HEADER_LEN(q->vsq_sc));
+ }
/* Make sure this request addresses a valid LUN. */
if (pci_vtscsi_check_lun(req->vsr_cmd_rd->lun) == false) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 8, 8:55 PM (19 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29539265
Default Alt Text
D55795.id173504.diff (716 B)
Attached To
Mode
D55795: bhyve/virtio-scsi: fix sign-compare warning on gcc15
Attached
Detach File
Event Timeline
Log In to Comment