mlx4_en: Fix out of bounds array access
authorEli Cohen <eli@dev.mellanox.co.il>
Mon, 25 Oct 2010 02:56:47 +0000 (02:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Oct 2010 19:14:11 +0000 (12:14 -0700)
When searching for a free entry in either mlx4_register_vlan() or
mlx4_register_mac(), and there is no free entry, the loop terminates without
updating the local variable free thus causing out of array bounds access. Fix
this by adding a proper check outside the loop.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found