* [PATCH] eepro: Read buffer overflow
@ 2009-07-25 22:40 Roel Kluin
2009-07-27 2:01 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-07-25 22:40 UTC (permalink / raw)
To: David S. Miller, netdev, Andrew Morton
io[i] is read before the bounds check on i, order should be reversed
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
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...)
");
}
- 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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] eepro: Read buffer overflow
2009-07-25 22:40 [PATCH] eepro: Read buffer overflow Roel Kluin
@ 2009-07-27 2:01 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-07-27 2:01 UTC (permalink / raw)
To: roel.kluin; +Cc: netdev, akpm
From: Roel Kluin <roel.kluin@gmail.com>
Date: Sun, 26 Jul 2009 00:40:59 +0200
> io[i] is read before the bounds check on i, order should be reversed
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-27 2:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-25 22:40 [PATCH] eepro: Read buffer overflow Roel Kluin
2009-07-27 2:01 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).