eepro: Read buffer overflow
Subsystems (2)
PATCH 1/1 eepro: Read buffer overflow
io[i] is read before the bounds check on i, order should be reversed
Signed-off-by Roel Kluin <[email protected]>
---
drivers/net/eepro.c +0 -0
@@ -1784,7 +1784,7 @@ int __init init_module(void) printk(KERN_INFO "eepro_init_module: Auto-detecting boards (May God protect us...)
");
}
- 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;
From: Roel Kluin <[email protected]>
Date: Sun, 26 Jul 2009 00:40:59 +0200
Quoted 3 lines
io[i] is read before the bounds check on i, order should be reversed
Signed-off-by Roel Kluin <[email protected]>
Applied.