[haiku-commits] haiku: hrev53346 - src/add-ons/kernel/drivers/network/emulex_oce/dev/oce

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 5 Aug 2019 23:18:41 -0400 (EDT)

hrev53346 adds 1 changeset to branch 'master'
old head: af0be8dbc5df319bb65ae62cb9924d7344847a73
new head: ec2b89264cfc63e05e611cce82cc449197403aa4
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=ec2b89264cfc+%5Eaf0be8dbc5df

----------------------------------------------------------------------------

ec2b89264cfc: oce_if: fix oout of bounds access
  
  Change-Id: Id052d9e7714c0251e39384671da9a0f76f6c13c4
  Reviewed-on: https://review.haiku-os.org/c/1682
  Reviewed-by: Rene Gollent <rene@xxxxxxxxxxx>

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53346
Commit:      ec2b89264cfc63e05e611cce82cc449197403aa4
URL:         https://git.haiku-os.org/haiku/commit/?id=ec2b89264cfc
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Mon Aug  5 16:54:17 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Tue Aug  6 03:18:36 2019 UTC

----------------------------------------------------------------------------

1 file changed, 3 insertions(+), 1 deletion(-)
src/add-ons/kernel/drivers/network/emulex_oce/dev/oce/oce_if.c | 4 +++-

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/drivers/network/emulex_oce/dev/oce/oce_if.c 
b/src/add-ons/kernel/drivers/network/emulex_oce/dev/oce/oce_if.c
index a1b983799a..6b6b075488 100644
--- a/src/add-ons/kernel/drivers/network/emulex_oce/dev/oce/oce_if.c
+++ b/src/add-ons/kernel/drivers/network/emulex_oce/dev/oce/oce_if.c
@@ -799,12 +799,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.


Other related posts: