Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 421eeea1 authored by Baozeng Ding's avatar Baozeng Ding Committed by David S. Miller
Browse files

ieee802154: fix logic error in ieee802154_llsec_parse_dev_addr



Fix a logic error to avoid potential null pointer dereference.

Signed-off-by: default avatarBaozeng Ding <sploving1@gmail.com>
Reviewed-by: default avatarStefan <Schmidt&lt;stefan@osg.samsung.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 86651650
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;