Skip to content

Commit

Permalink
dcb: Add missing error check in dcb_ieee_set()
Browse files Browse the repository at this point in the history
Missing error checking before nla_parse_nested().

Reported-by: Mark Rustad <[email protected]>
Signed-off-by: John Fastabend <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
John Fastabend authored and davem330 committed Jun 21, 2011
1 parent ab6baf9 commit 4003b65
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/dcb/dcbnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1368,6 +1368,9 @@ static int dcbnl_ieee_set(struct net_device *netdev, struct nlattr **tb,
if (!ops)
return err;

if (!tb[DCB_ATTR_IEEE])
return -EINVAL;

err = nla_parse_nested(ieee, DCB_ATTR_IEEE_MAX,
tb[DCB_ATTR_IEEE], dcbnl_ieee_policy);
if (err)
Expand Down

0 comments on commit 4003b65

Please sign in to comment.