mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
net: netlink_getname, packet_getname -- use DECLARE_SOCKADDR guard
Use guard DECLARE_SOCKADDR in a few more places which allow us to catch if the structure copied back is too big. Signed-off-by: Cyrill Gorcunov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
37e8273cd3
commit
13cfa97bef
3 changed files with 3 additions and 3 deletions
|
|
@ -708,7 +708,7 @@ static int netlink_getname(struct socket *sock, struct sockaddr *addr,
|
|||
{
|
||||
struct sock *sk = sock->sk;
|
||||
struct netlink_sock *nlk = nlk_sk(sk);
|
||||
struct sockaddr_nl *nladdr = (struct sockaddr_nl *)addr;
|
||||
DECLARE_SOCKADDR(struct sockaddr_nl *, nladdr, addr);
|
||||
|
||||
nladdr->nl_family = AF_NETLINK;
|
||||
nladdr->nl_pad = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue