[IPv4] fib: Fix out of bound access of fib_props[]
Fixes a typo which caused fib_props[] to have the wrong size and makes sure the value used to index the array which is provided by userspace via netlink is checked to avoid out of bound access. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
954b2e7f4c
commit
a0ee18b9b7
@@ -89,7 +89,7 @@ static const struct
|
||||
{
|
||||
int error;
|
||||
u8 scope;
|
||||
} fib_props[RTA_MAX + 1] = {
|
||||
} fib_props[RTN_MAX + 1] = {
|
||||
{
|
||||
.error = 0,
|
||||
.scope = RT_SCOPE_NOWHERE,
|
||||
|
Reference in New Issue
Block a user