Author: sephe
Date: Mon Oct 17 08:39:17 2016
New Revision: 307510
URL: https://svnweb.freebsd.org/changeset/base/307510

Log:
  MFC 305789
  
      hyperv/vmbus: Make sure that the sub-channel count is valid.
  
      Sponsored by:   Microsoft
      Differential Revision:  https://reviews.freebsd.org/D7865

Modified:
  stable/11/sys/dev/hyperv/vmbus/vmbus_chan.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/hyperv/vmbus/vmbus_chan.c
==============================================================================
--- stable/11/sys/dev/hyperv/vmbus/vmbus_chan.c Mon Oct 17 08:38:24 2016        
(r307509)
+++ stable/11/sys/dev/hyperv/vmbus/vmbus_chan.c Mon Oct 17 08:39:17 2016        
(r307510)
@@ -1346,6 +1346,8 @@ vmbus_subchan_get(struct vmbus_channel *
        struct vmbus_channel **ret, *chan;
        int i;
 
+       KASSERT(subchan_cnt > 0, ("invalid sub-channel count %d", subchan_cnt));
+
        ret = malloc(subchan_cnt * sizeof(struct vmbus_channel *), M_TEMP,
            M_WAITOK);
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to