xen: fix out-of-bounds access to ipi_handle

Fix the gate in xen_pv_lapic_ipi_vectored to prevent access to element
at position nitems(xen_ipis).

Sponsored by: Citrix Systems R&D
Coverity ID: 1223203
Approved by: gibbs
This commit is contained in:
Roger Pau Monné 2014-06-18 13:41:20 +00:00
parent b8c1bd1300
commit 8114c8e190
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=267607

View File

@ -272,7 +272,7 @@ xen_pv_lapic_ipi_vectored(u_int vector, int dest)
int ipi_idx, to_cpu, self;
ipi_idx = IPI_TO_IDX(vector);
if (ipi_idx > nitems(xen_ipis))
if (ipi_idx >= nitems(xen_ipis))
panic("IPI out of range");
switch(dest) {