Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d513d018 authored by Roel Kluin's avatar Roel Kluin Committed by David S. Miller
Browse files

eepro: Read buffer overflow



io[i] is read before the bounds check on i, order should be reversed

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c65d3198
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;