Commit 6e2866a9 authored by David S. Miller's avatar David S. Miller

Merge tag 'batadv-net-for-davem-20190821' of git://git.open-mesh.org/linux-merge

Simon Wunderlich says:

====================
Here is a batman-adv bugfix:

 - fix uninit-value in batadv_netlink_get_ifindex(), by Eric Dumazet
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents aad12c23 3ee1bb7a
...@@ -164,7 +164,7 @@ batadv_netlink_get_ifindex(const struct nlmsghdr *nlh, int attrtype) ...@@ -164,7 +164,7 @@ batadv_netlink_get_ifindex(const struct nlmsghdr *nlh, int attrtype)
{ {
struct nlattr *attr = nlmsg_find_attr(nlh, GENL_HDRLEN, attrtype); struct nlattr *attr = nlmsg_find_attr(nlh, GENL_HDRLEN, attrtype);
return attr ? nla_get_u32(attr) : 0; return (attr && nla_len(attr) == sizeof(u32)) ? nla_get_u32(attr) : 0;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment