aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-07-26 18:53:17 -0700
committerDavid S. Miller <davem@davemloft.net>2009-07-26 18:53:17 -0700
commitd513d018e2236930b6163241bbdce64d2c0de49e (patch)
tree059d2fc3a2276547bda67eebd4b30815b1c0cbff /drivers/net
parentc65d3198addb1a2862d4b88bc2a74ac9cbed66f9 (diff)
downloadkernel_samsung_crespo-d513d018e2236930b6163241bbdce64d2c0de49e.zip
kernel_samsung_crespo-d513d018e2236930b6163241bbdce64d2c0de49e.tar.gz
kernel_samsung_crespo-d513d018e2236930b6163241bbdce64d2c0de49e.tar.bz2
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/eepro.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c
index cc2ab64..4f70034 100644
--- a/drivers/net/eepro.c
+++ b/drivers/net/eepro.c
@@ -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;