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
4150014e58
commit
5587f6c598
@ -836,12 +836,14 @@ oce_fast_isr(void *arg)
|
||||
static int
|
||||
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;
|
||||
|
||||
if (vector >= OCE_MAX_EQ)
|
||||
return (EINVAL);
|
||||
|
||||
ii = &sc->intrs[vector];
|
||||
|
||||
/* Set the resource id for the interrupt.
|
||||
* MSIx is vector + 1 for the resource id,
|
||||
* INTx is 0 for the resource id.
|
||||
|
Loading…
x
Reference in New Issue
Block a user