提交 d513d018 编写于 作者: R Roel Kluin 提交者: David S. Miller

eepro: Read buffer overflow

io[i] is read before the bounds check on i, order should be reversed
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c65d3198
......@@ -1784,7 +1784,7 @@ int __init init_module(void)
printk(KERN_INFO "eepro_init_module: Auto-detecting boards (May God protect us...)\n");
}
for (i = 0; io[i] != -1 && i < MAX_EEPRO; i++) {
for (i = 0; i < MAX_EEPRO && io[i] != -1; i++) {
dev = alloc_etherdev(sizeof(struct eepro_local));
if (!dev)
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册