浏览代码

[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 */

正在加载...
取消
保存