]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[w89c840] Avoid potential array overrun
authorMichael Brown <mcb30@ipxe.org>
Wed, 22 Mar 2017 13:59:27 +0000 (15:59 +0200)
committerMichael Brown <mcb30@ipxe.org>
Wed, 22 Mar 2017 13:59:27 +0000 (15:59 +0200)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/w89c840.c

index d8144a8ced4389ac1b901a28f382269bf4c2de6a..72ccf3a28a314ffe755c9a4f943c6463e8e37720 100644 (file)
@@ -247,7 +247,7 @@ static struct winbond_private
     /* MII transceiver section. */
     int mii_cnt;                        /* MII device addresses. */
     u16 advertising;                    /* NWay media advertisement */
-    unsigned char phys[2];                /* MII device addresses. */
+    unsigned char phys[4];                /* MII device addresses. */
 } w840private __attribute__ ((aligned (PRIV_ALIGN_BYTES)));
 
 /* NIC specific static variables go here */