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: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -164,7 +164,7 @@ batadv_netlink_get_ifindex(const struct nlmsghdr *nlh, int 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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user