From: Roel Kluin Date: Mon, 27 Jul 2009 01:53:17 +0000 (-0700) Subject: eepro: Read buffer overflow X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d513d018e2236930b6163241bbdce64d2c0de49e;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git eepro: Read buffer overflow io[i] is read before the bounds check on i, order should be reversed Signed-off-by: Roel Kluin Signed-off-by: David S. Miller --- diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c index cc2ab6412c7..4f700348534 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;