mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
pkt_sched: fix missing check for packet overrun in qdisc_dump_stab()
nla_nest_start() might return NULL, causing a NULL pointer dereference. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f7f65d1e8b
commit
3aa4614da7
1 changed files with 2 additions and 0 deletions
|
@ -417,6 +417,8 @@ static int qdisc_dump_stab(struct sk_buff *skb, struct qdisc_size_table *stab)
|
|||
struct nlattr *nest;
|
||||
|
||||
nest = nla_nest_start(skb, TCA_STAB);
|
||||
if (nest == NULL)
|
||||
goto nla_put_failure;
|
||||
NLA_PUT(skb, TCA_STAB_BASE, sizeof(stab->szopts), &stab->szopts);
|
||||
nla_nest_end(skb, nest);
|
||||
|
||||
|
|
Loading…
Reference in a new issue