projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
aad12c2
)
Merge tag 'batadv-net-for-davem-20190821' of git://git.open-mesh.org/linux-merge
author
David S. Miller
<davem@davemloft.net>
Wed, 21 Aug 2019 20:49:20 +0000
(13:49 -0700)
committer
David S. Miller
<davem@davemloft.net>
Wed, 21 Aug 2019 20:49:20 +0000
(13:49 -0700)
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>
net/batman-adv/netlink.c
patch
|
blob
|
blame
|
history
diff --git
a/net/batman-adv/netlink.c
b/net/batman-adv/netlink.c
index 6f08fd122a8ddea43600c856a6be171dc7625d9c..7e052d6f759b659dbee0edd7546c367cf14b8e9e 100644
(file)
--- a/
net/batman-adv/netlink.c
+++ b/
net/batman-adv/netlink.c
@@
-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;
}
/**