tokenring: 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>
This commit is contained in:
parent
3b73e79b0d
commit
c65d3198ad
|
@ -1912,7 +1912,7 @@ static int __init ibmtr_init(void)
|
|||
|
||||
find_turbo_adapters(io);
|
||||
|
||||
for (i = 0; io[i] && (i < IBMTR_MAX_ADAPTERS); i++) {
|
||||
for (i = 0; i < IBMTR_MAX_ADAPTERS && io[i]; i++) {
|
||||
struct net_device *dev;
|
||||
irq[i] = 0;
|
||||
mem[i] = 0;
|
||||
|
|
Loading…
Reference in New Issue