Commit 037c635e authored by Stephen Hemminger's avatar Stephen Hemminger

Fix off by one in nested attribute management.

Fixes segv in:
  tc qdisc show dev eth1
due to uninitialized attribute table.
Signed-off-by: default avatarStephen Hemminger <shemminger@linux-foundation.org>
parent 5472ac6f
......@@ -632,6 +632,6 @@ int __parse_rtattr_nested_compat(struct rtattr *tb[], int max, struct rtattr *rt
rta = RTA_DATA(rta) + RTA_ALIGN(len);
return parse_rtattr_nested(tb, max, rta);
}
memset(tb, 0, sizeof(struct rtattr *) * max);
memset(tb, 0, sizeof(struct rtattr *) * (max + 1));
return 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