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>
This commit is contained in:
committed by
David S. Miller
parent
86651650d1
commit
421eeea10d
@@ -1289,8 +1289,8 @@ ieee802154_llsec_parse_dev_addr(struct nlattr *nla,
|
|||||||
nl802154_dev_addr_policy))
|
nl802154_dev_addr_policy))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (!attrs[NL802154_DEV_ADDR_ATTR_PAN_ID] &&
|
if (!attrs[NL802154_DEV_ADDR_ATTR_PAN_ID] ||
|
||||||
!attrs[NL802154_DEV_ADDR_ATTR_MODE] &&
|
!attrs[NL802154_DEV_ADDR_ATTR_MODE] ||
|
||||||
!(attrs[NL802154_DEV_ADDR_ATTR_SHORT] ||
|
!(attrs[NL802154_DEV_ADDR_ATTR_SHORT] ||
|
||||||
attrs[NL802154_DEV_ADDR_ATTR_EXTENDED]))
|
attrs[NL802154_DEV_ADDR_ATTR_EXTENDED]))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|||||||
Reference in New Issue
Block a user