svn commit: r254948 - head/usr.sbin/bhyve

Peter Grehan grehan at FreeBSD.org
Tue Aug 27 03:49:48 UTC 2013


Author: grehan
Date: Tue Aug 27 03:49:47 2013
New Revision: 254948
URL: http://svnweb.freebsd.org/changeset/base/254948

Log:
  Fix off-by-1 error in assert.
  
  Submitted by:	Tycho Nightingale (tycho.nightingale at pluribusnetworks.com)

Modified:
  head/usr.sbin/bhyve/pci_virtio_block.c

Modified: head/usr.sbin/bhyve/pci_virtio_block.c
==============================================================================
--- head/usr.sbin/bhyve/pci_virtio_block.c	Tue Aug 27 03:11:49 2013	(r254947)
+++ head/usr.sbin/bhyve/pci_virtio_block.c	Tue Aug 27 03:49:47 2013	(r254948)
@@ -156,7 +156,7 @@ pci_vtblk_proc(struct pci_vtblk_softc *s
 	 * XXX - note - this fails on crash dump, which does a
 	 * VIRTIO_BLK_T_FLUSH with a zero transfer length
 	 */
-	assert (n >= 3 && n < VTBLK_MAXSEGS + 2);
+	assert (n >= 3 && n <= VTBLK_MAXSEGS + 2);
 
 	assert((flags[0] & VRING_DESC_F_WRITE) == 0);
 	assert(iov[0].iov_len == sizeof(struct virtio_blk_hdr));


More information about the svn-src-head mailing list