projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
865d9f9
)
sock_diag: off by one checks
author
Dan Carpenter
<
[email protected]
>
Wed, 7 Dec 2011 20:49:38 +0000
(20:49 +0000)
committer
David S. Miller
<
[email protected]
>
Fri, 9 Dec 2011 00:58:35 +0000
(19:58 -0500)
These tests are off by one because sock_diag_handlers[] only has AF_MAX
elements.
Signed-off-by: Dan Carpenter <
[email protected]
>
Acked-by: Pavel Emelyanov <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/core/sock_diag.c
patch
|
blob
|
history
diff --git
a/net/core/sock_diag.c
b/net/core/sock_diag.c
index fbaf01ce12f21def454a91a3098a9dafecc384cb..9c27bcda59be193e30341074939cd42899cd5d1b 100644
(file)
--- a/
net/core/sock_diag.c
+++ b/
net/core/sock_diag.c
@@
-32,7
+32,7
@@
int sock_diag_register(struct sock_diag_handler *hndl)
{
int err = 0;
- if (hndl->family > AF_MAX)
+ if (hndl->family >
=
AF_MAX)
return -EINVAL;
mutex_lock(&sock_diag_table_mutex);
@@
-50,7
+50,7
@@
void sock_diag_unregister(struct sock_diag_handler *hnld)
{
int family = hnld->family;
- if (family > AF_MAX)
+ if (family >
=
AF_MAX)
return;
mutex_lock(&sock_diag_table_mutex);