Date: Thu, 13 Oct 2016 08:50:18 +0000 (UTC) From: Sepherosa Ziehau <sephe@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r307207 - stable/10/sys/dev/hyperv/vmbus Message-ID: <201610130850.u9D8oIgZ046687@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sephe Date: Thu Oct 13 08:50:18 2016 New Revision: 307207 URL: https://svnweb.freebsd.org/changeset/base/307207 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/10/sys/dev/hyperv/vmbus/vmbus_chan.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- stable/10/sys/dev/hyperv/vmbus/vmbus_chan.c Thu Oct 13 08:47:51 2016 (r307206) +++ stable/10/sys/dev/hyperv/vmbus/vmbus_chan.c Thu Oct 13 08:50:18 2016 (r307207) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610130850.u9D8oIgZ046687>