mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-18 14:46:22 +07:00
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:
parent
86651650d1
commit
421eeea10d
@ -1289,8 +1289,8 @@ ieee802154_llsec_parse_dev_addr(struct nlattr *nla,
|
||||
nl802154_dev_addr_policy))
|
||||
return -EINVAL;
|
||||
|
||||
if (!attrs[NL802154_DEV_ADDR_ATTR_PAN_ID] &&
|
||||
!attrs[NL802154_DEV_ADDR_ATTR_MODE] &&
|
||||
if (!attrs[NL802154_DEV_ADDR_ATTR_PAN_ID] ||
|
||||
!attrs[NL802154_DEV_ADDR_ATTR_MODE] ||
|
||||
!(attrs[NL802154_DEV_ADDR_ATTR_SHORT] ||
|
||||
attrs[NL802154_DEV_ADDR_ATTR_EXTENDED]))
|
||||
return -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user