projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e33b71
)
zorro8390: Fix read buffer overflow in zorro8390_init_one()
author
roel kluin
<roel.kluin@gmail.com>
Sun, 9 Aug 2009 04:00:25 +0000
(
04:00
+0000)
committer
David S. Miller
<davem@davemloft.net>
Mon, 10 Aug 2009 04:46:53 +0000
(21:46 -0700)
Prevent read from cards[-1] when no card was found.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/zorro8390.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/zorro8390.c
b/drivers/net/zorro8390.c
index 37c84e3b8be083426a89e1e68686dbb0ad569764..81c753a617ab93ab793b724428c9c0c97646da84 100644
(file)
--- a/
drivers/net/zorro8390.c
+++ b/
drivers/net/zorro8390.c
@@
-120,6
+120,9
@@
static int __devinit zorro8390_init_one(struct zorro_dev *z,
for (i = ARRAY_SIZE(cards)-1; i >= 0; i--)
if (z->id == cards[i].id)
break;
+ if (i < 0)
+ return -ENODEV;
+
board = z->resource.start;
ioaddr = board+cards[i].offset;
dev = alloc_ei_netdev();