diff options
author | Baozeng Ding <sploving1@gmail.com> | 2016-05-26 09:07:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-30 01:36:25 -0400 |
commit | 421eeea10d0a5e52256bce9544de477938104fdb (patch) | |
tree | ca3ff196e261ca492247d2490cc951948a23c218 /net/ieee802154 | |
parent | 86651650d16a359e4142c6a8b0467c87e48c4c94 (diff) |
ieee802154: fix logic error in ieee802154_llsec_parse_dev_addr
Fix a logic error to avoid potential null pointer dereference.
Signed-off-by: Baozeng Ding <sploving1@gmail.com>
Reviewed-by: Stefan Schmidt<stefan@osg.samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ieee802154')
-rw-r--r-- | net/ieee802154/nl802154.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c index ca207dbf673b..116187b5c267 100644 --- a/net/ieee802154/nl802154.c +++ b/net/ieee802154/nl802154.c | |||
@@ -1289,8 +1289,8 @@ ieee802154_llsec_parse_dev_addr(struct nlattr *nla, | |||
1289 | nl802154_dev_addr_policy)) | 1289 | nl802154_dev_addr_policy)) |
1290 | return -EINVAL; | 1290 | return -EINVAL; |
1291 | 1291 | ||
1292 | if (!attrs[NL802154_DEV_ADDR_ATTR_PAN_ID] && | 1292 | if (!attrs[NL802154_DEV_ADDR_ATTR_PAN_ID] || |
1293 | !attrs[NL802154_DEV_ADDR_ATTR_MODE] && | 1293 | !attrs[NL802154_DEV_ADDR_ATTR_MODE] || |
1294 | !(attrs[NL802154_DEV_ADDR_ATTR_SHORT] || | 1294 | !(attrs[NL802154_DEV_ADDR_ATTR_SHORT] || |
1295 | attrs[NL802154_DEV_ADDR_ATTR_EXTENDED])) | 1295 | attrs[NL802154_DEV_ADDR_ATTR_EXTENDED])) |
1296 | return -EINVAL; | 1296 | return -EINVAL; |