mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
eepro: Read buffer overflow
io[i] is read before the bounds check on i, order should be reversed Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c65d3198ad
commit
d513d018e2
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue