diff options
author | Laine Stump <laine@laine.org> | 2017-01-17 15:47:34 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-01-17 17:03:36 (GMT) |
commit | 2d11f40f5034eeee4c2c994aa4015aa11d7a3784 (patch) | |
tree | d3cd7b00d414af7aa6ddec196ea209c117461e68 /lib | |
parent | e2d8f05bd9ffc6748d1c02482cba8c693a49557c (diff) | |
download | libnl-2d11f40f5034eeee4c2c994aa4015aa11d7a3784.zip libnl-2d11f40f5034eeee4c2c994aa4015aa11d7a3784.tar.gz libnl-2d11f40f5034eeee4c2c994aa4015aa11d7a3784.tar.bz2 |
sriov: fix crash in rtnl_link_sriov_parse_vflist
vf_vlan_info was incorrectly indexed with "len" (the length in bytes
of the entire vfinfo_list rather than list_len (the index of the
current end of the vf_vlan_info array)
https://github.com/thom311/libnl/issues/126
http://lists.infradead.org/pipermail/libnl/2017-January/002270.html
Fixes: 5d6e43ebef12deadf31fccfa46c0b34892675d36
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/route/link/sriov.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/route/link/sriov.c b/lib/route/link/sriov.c index acabf67..3721ae8 100644 --- a/lib/route/link/sriov.c +++ b/lib/route/link/sriov.c @@ -568,7 +568,7 @@ int rtnl_link_sriov_parse_vflist(struct rtnl_link *link, struct nlattr **tb) { list_len = 0; nla_for_each_nested(nla_list, t[IFLA_VF_VLAN_LIST], list_rem) { - vf_vlan_info[len] = nla_data(nla_list); + vf_vlan_info[list_len] = nla_data(nla_list); list_len++; } |