Author: sephe Date: Wed Sep 14 06:30:14 2016 New Revision: 305789 URL: https://svnweb.freebsd.org/changeset/base/305789
Log: hyperv/vmbus: Make sure that the sub-channel count is valid. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7865 Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Sep 14 06:15:45 2016 (r305788) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Sep 14 06:30:14 2016 (r305789) @@ -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"