oce(4): potential out of bounds access before vector validation
Submitted by: Augustin Cavalier <waddlesplash@gmail.com> Obtained from: Haiku (ec2b89264cfc63e05e611cce82cc449197403aa4) MFC after: 3 days
This commit is contained in:
parent
12b678e9f2
commit
ab7de25c25
@ -836,12 +836,14 @@ oce_fast_isr(void *arg)
|
|||||||
static int
|
static int
|
||||||
oce_alloc_intr(POCE_SOFTC sc, int vector, void (*isr) (void *arg, int pending))
|
oce_alloc_intr(POCE_SOFTC sc, int vector, void (*isr) (void *arg, int pending))
|
||||||
{
|
{
|
||||||
POCE_INTR_INFO ii = &sc->intrs[vector];
|
POCE_INTR_INFO ii;
|
||||||
int rc = 0, rr;
|
int rc = 0, rr;
|
||||||
|
|
||||||
if (vector >= OCE_MAX_EQ)
|
if (vector >= OCE_MAX_EQ)
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
|
|
||||||
|
ii = &sc->intrs[vector];
|
||||||
|
|
||||||
/* Set the resource id for the interrupt.
|
/* Set the resource id for the interrupt.
|
||||||
* MSIx is vector + 1 for the resource id,
|
* MSIx is vector + 1 for the resource id,
|
||||||
* INTx is 0 for the resource id.
|
* INTx is 0 for the resource id.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user