diff options
author | Thomas Graf <tgraf@suug.ch> | 2007-03-24 23:32:54 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-03-25 21:48:03 -0400 |
commit | a0ee18b9b7d3847976c6fb315c06a34fb296de0e (patch) | |
tree | 5ebef9a68b3aba01c0d8b3285429ae47bb287c9a /net/ipv4/fib_semantics.c | |
parent | 954b2e7f4c37cbcdcf4ca7ac47524f3f6bf30119 (diff) |
[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>
Diffstat (limited to 'net/ipv4/fib_semantics.c')
-rw-r--r-- | net/ipv4/fib_semantics.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index 2f1fdae6efa6..3dad12ee76c3 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c | |||
@@ -89,7 +89,7 @@ static const struct | |||
89 | { | 89 | { |
90 | int error; | 90 | int error; |
91 | u8 scope; | 91 | u8 scope; |
92 | } fib_props[RTA_MAX + 1] = { | 92 | } fib_props[RTN_MAX + 1] = { |
93 | { | 93 | { |
94 | .error = 0, | 94 | .error = 0, |
95 | .scope = RT_SCOPE_NOWHERE, | 95 | .scope = RT_SCOPE_NOWHERE, |