Message ID | 20200402040225.favho3pCV%akpm@linux-foundation.org |
---|---|
State | New |
Headers | show |
Series | [001/155] tools/accounting/getdelays.c: fix netlink attribute length | expand |
--- a/tools/accounting/getdelays.c~getdelays-fix-netlink-attribute-length +++ a/tools/accounting/getdelays.c @@ -136,7 +136,7 @@ static int send_cmd(int sd, __u16 nlmsg_ msg.g.version = 0x1; na = (struct nlattr *) GENLMSG_DATA(&msg); na->nla_type = nla_type; - na->nla_len = nla_len + 1 + NLA_HDRLEN; + na->nla_len = nla_len + NLA_HDRLEN; memcpy(NLA_DATA(na), nla_data, nla_len); msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len);