瀏覽代碼

[w89c840] Avoid potential array overrun

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 年之前
父節點
當前提交
99e1207a4d
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      src/drivers/net/w89c840.c

+ 1
- 1
src/drivers/net/w89c840.c 查看文件

@@ -247,7 +247,7 @@ static struct winbond_private
247 247
     /* MII transceiver section. */
248 248
     int mii_cnt;                        /* MII device addresses. */
249 249
     u16 advertising;                    /* NWay media advertisement */
250
-    unsigned char phys[2];                /* MII device addresses. */
250
+    unsigned char phys[4];                /* MII device addresses. */
251 251
 } w840private __attribute__ ((aligned (PRIV_ALIGN_BYTES)));
252 252
 
253 253
 /* NIC specific static variables go here */

Loading…
取消
儲存