tokenring: Read buffer overflow
Subsystems (2)
PATCH 1/1 tokenring: Read buffer overflow
io[i] is read before the bounds check on i, order should be reversed
Signed-off-by Roel Kluin <[email protected]>
---
drivers/net/tokenring/ibmtr.c +1 -1
@@ -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 ;
From: Roel Kluin <[email protected]>
Date: Sun, 26 Jul 2009 00:38:33 +0200
Quoted 3 lines
io[i] is read before the bounds check on i, order should be reversed
Signed-off-by Roel Kluin <[email protected]>
Applied.