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.nighting...@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));
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to